Opened 6 years ago
Closed 6 years ago
#29716 closed Bug (wontfix)
Add a warning in LocaleMiddleware is after CommonMiddleware or before SessionMiddelware
Reported by: | Sanyam Khurana | Owned by: | Sanyam Khurana |
---|---|---|---|
Component: | Internationalization | Version: | 2.1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
The SessionMiddleware
sets the session cookie that may contain the language code for Internationalization and translations.
If the LocaleMiddleware is not placed after SessionMiddleware, it won't be able to find the language code and won't be able to activate
the language from HTTPRequest and use it.
So, if the order of these Middleware classes is not appropriate, a warning should be displayed.
Change History (2)
comment:1 by , 6 years ago
Owner: | changed from | to
---|
comment:2 by , 6 years ago
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
See ticket #15902, the language is now (from Django 2.1) also stored in a cookie, that's why I think the issue you mention should not happen again in the future.