File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55from django .core .exceptions import ValidationError
66from django .http import HttpResponseRedirect
77from django .shortcuts import resolve_url
8+ from django .views .decorators .cache import never_cache
89from django .urls import (
910 include ,
1011 path ,
@@ -98,7 +99,7 @@ def actions__submit__post_handler(request, **_):
9899 return HttpResponseRedirect (resolve_url (settings .LOGOUT_REDIRECT_URL or '/' ))
99100
100101
101- logout = LogoutForm ().as_view ()
102+ logout = never_cache ( LogoutForm ().as_view () )
102103
103104
104105class LoginForm (Form ):
@@ -130,7 +131,7 @@ class LoginPage(Page):
130131 form = LoginForm ()
131132
132133
133- login = LoginPage ().as_view ()
134+ login = never_cache ( LoginPage ().as_view () )
134135
135136
136137def current_password__is_valid (form , parsed_data , ** _ ):
@@ -190,4 +191,4 @@ class ChangePasswordPage(Page):
190191 form = ChangePasswordForm ()
191192
192193
193- change_password = ChangePasswordPage ().as_view ()
194+ change_password = never_cache ( ChangePasswordPage ().as_view () )
You can’t perform that action at this time.
0 commit comments