-
Notifications
You must be signed in to change notification settings - Fork 351
Open
Labels
Description
When using account_settings to save changes for a user -- e.g. language -- it's getting updated in database, but does not update the users's session
I think it should upgrade the language for the user to the just picked one
I did a q'n'dirty fix for my project by little updating the original one
class SettingsView(account.views.SettingsView):
template_name = "user_home.html"
def form_valid(self, form):
response = super().form_valid(form)
lang = form.cleaned_data["language"]
translation.activate(lang)
response.set_cookie(settings.LANGUAGE_COOKIE_NAME, lang)
return response