diff options
Diffstat (limited to 'django')
| -rw-r--r-- | django/conf/global_settings.py | 2 | ||||
| -rw-r--r-- | django/contrib/auth/views.py | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/django/conf/global_settings.py b/django/conf/global_settings.py index b540fbc5a3..8eef00f2c1 100644 --- a/django/conf/global_settings.py +++ b/django/conf/global_settings.py @@ -489,6 +489,8 @@ LOGIN_URL = '/accounts/login/' LOGIN_REDIRECT_URL = '/accounts/profile/' +LOGOUT_REDIRECT_URL = None + # The number of days a password reset link is valid for PASSWORD_RESET_TIMEOUT_DAYS = 3 diff --git a/django/contrib/auth/views.py b/django/contrib/auth/views.py index fee3067646..e2387fea89 100644 --- a/django/contrib/auth/views.py +++ b/django/contrib/auth/views.py @@ -104,6 +104,8 @@ def logout(request, next_page=None, if next_page is not None: next_page = resolve_url(next_page) + elif settings.LOGOUT_REDIRECT_URL: + next_page = resolve_url(settings.LOGOUT_REDIRECT_URL) if (redirect_field_name in request.POST or redirect_field_name in request.GET): |
