Fixed LogoutView for Django 4
This commit is contained in:
@@ -48,9 +48,10 @@ class LoginView(auth_views.LoginView):
|
||||
|
||||
|
||||
class LogoutView(auth_views.LogoutView):
|
||||
def get_next_page(self):
|
||||
url = super().get_next_page()
|
||||
if not url and app_config.settings.logout_redirect_url:
|
||||
@property
|
||||
def next_page(self):
|
||||
url = None
|
||||
if app_config.settings.logout_redirect_url:
|
||||
url = resolve_url(app_config.settings.logout_redirect_url)
|
||||
return url
|
||||
|
||||
|
||||
Reference in New Issue
Block a user