diff options
Diffstat (limited to '')
-rw-r--r-- | accounts/views.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/accounts/views.py b/accounts/views.py index 3cffa09..f00cfe9 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -419,7 +419,10 @@ def personal_wrapper(request, errors): errors.append("La password deve contenere lettere") elif err.code == "password_incorrect": errors.append("La password attuale รจ incorretta") - + elif request.POST['action'] == "css": + print("setting new_css", "css" in request.POST) + request.session["new_css"] = "css" in request.POST + usable_password = request.user.has_usable_password() # fill context @@ -428,6 +431,7 @@ def personal_wrapper(request, errors): 'errors': errors, 'ok_message': ok_message, 'usable_password': usable_password, + 'css_check': "checked='checked'" if request.session.get("new_css", False) else "", } return render(request, 'accounts/index.html', context) |