aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/views.py
diff options
context:
space:
mode:
authorAndrea Lepori <aleporia@gmail.com>2024-11-12 15:53:42 +0100
committerAndrea Lepori <aleporia@gmail.com>2024-11-12 15:53:42 +0100
commitac2845b70d7e5a5ab0b9af0610910bc8e59a1fda (patch)
tree10fec1166a85538b26942efb2471faef4575cdf9 /accounts/views.py
parentadd new materialize v2 (diff)
downloadscout-subs-ac2845b70d7e5a5ab0b9af0610910bc8e59a1fda.tar.gz
scout-subs-ac2845b70d7e5a5ab0b9af0610910bc8e59a1fda.zip
add option to change to new css
Diffstat (limited to 'accounts/views.py')
-rw-r--r--accounts/views.py6
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)