Answer the question
In order to leave comments, you need to log in
How to redirect to a language in django?
Project on jung 1.7, used battery solid_i18n. The rules for such a site in Russian come with the prefix /ru site in English without a prefix, LANGUAGE_CODE = "en", everything works fine on local, I go here 127.0.0.1:8000 either redirects me to the ru prefix or opens the English version, depending on the previously selected but I roll it out to the server and everything changes, if I go to the site it throws me at 404 until I choose the language or follow the link on the site. Who will prompt in what there can be a plug? Only one option is enabled, settings.SOLID_I18N_USE_REDIRECTS = True. I've tried every combination though. Maybe you need to configure nginx for this case?
Answer the question
In order to leave comments, you need to log in
I actually figured it out, when the debug was turned off, everything broke, set the settings, as in the example of the battery developers, everything worked
IMHO, not enough information. When does a 404 error appear? If you disable the module, does the site work normally?
In general, find out the cause of the 404 error. If this is a 404 nginx error, then deal with it first. If there is a 404 application error, then find out the reason further (turn on the debug mode, maybe you actually have a 500 there).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question