On Sat, Dec 24, 2016 at 3:02 AM, <[email protected]> wrote: > Hi, > > I'm looking for an advice how Mezzanine handles urls for images, when > *USE_I18N* is *True* ? > > In debug mode, all uploaded images have correct urls, like > */static/media/uploads/rioba.png*, but in production (when *DEBUG is set > to False*) and application is run with ./manage.py runserver --insecure, > I'm getting following 404 errors: > > "GET /static/media/uploads/rioba.png HTTP/1.1" 301 0 > "GET /nl/static/media/uploads/rioba.png/ HTTP/1.1" 404 5954 > > In other words, Mezzanine redirects request to MEDIA_URL link to url with > language code prefix. >
Sounds like there's a bug there when serving static files through Django in production, but it's no surprise that's gone unnoticed since you should never be doing this - the public facing web server should be catching all the static URLs before the Django app is ever hit, for example see the bundled nginx conf here: https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/project_template/deploy/nginx.conf.template#L37-L42 > > I do not want this behavior, all images are common to all language > variants. Is there some way how it can be disabled ? > > Thanks. > > -- > You received this message because you are subscribed to the Google Groups > "Mezzanine Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Stephen McDonald http://jupo.org -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
