mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-26 01:16:01 +03:00
[PR #2788] [MERGED] Change middlwares order and set cookies cookies instead of using depr… #2687
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#2687
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/modoboa/modoboa/pull/2788
Author: @moweerkat
Created: 2/17/2023
Status: ✅ Merged
Merged: 2/17/2023
Merged by: @tonioo
Base:
master← Head:fix/interface_v1_fix_language_switch📝 Commits (2)
0424a6cChange middlwares order and set cookies cookies instead of using deprecated sessions for language switching117037fFix return📊 Changes
5 files changed (+16 additions, -14 deletions)
View changed files
📝
doc/upgrade.rst(+2 -2)📝
modoboa/core/commands/templates/settings.py.tpl(+2 -2)📝
modoboa/core/views/auth.py(+5 -3)📝
modoboa/core/views/user.py(+5 -5)📝
test_project/test_project/settings.py(+2 -2)📄 Description
Description of the issue/feature this PR addresses:
https://github.com/modoboa/modoboa/issues/2719
Setting language in sessions is deprecated in Django since 3.0. Set a cookie instead. Also update the middlewares order to match the requirements.
https://docs.djangoproject.com/en/3.0/topics/i18n/translation/#explicitly-setting-the-active-language
Current behavior before PR:
Cannot switch from one language to another with the old interface.
Desired behavior after PR is merged:
It fixes it
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.