Fixes incorrect LOGIN_URL and LOGOUT_URL by means of reverse_lazy call.
This commit is contained in:
parent
9553acecb2
commit
1c3791417c
1 changed files with 3 additions and 2 deletions
|
|
@ -13,6 +13,7 @@ always be sure of what you have changed and what is default behaviour.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
from builtins import range
|
from builtins import range
|
||||||
|
from django.urls import reverse_lazy
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
@ -697,9 +698,9 @@ ROOT_URLCONF = 'web.urls'
|
||||||
# Where users are redirected after logging in via contrib.auth.login.
|
# Where users are redirected after logging in via contrib.auth.login.
|
||||||
LOGIN_REDIRECT_URL = '/'
|
LOGIN_REDIRECT_URL = '/'
|
||||||
# Where to redirect users when using the @login_required decorator.
|
# Where to redirect users when using the @login_required decorator.
|
||||||
LOGIN_URL = '/accounts/login'
|
LOGIN_URL = reverse_lazy('login')
|
||||||
# Where to redirect users who wish to logout.
|
# Where to redirect users who wish to logout.
|
||||||
LOGOUT_URL = '/accounts/login'
|
LOGOUT_URL = reverse_lazy('logout')
|
||||||
# URL that handles the media served from MEDIA_ROOT.
|
# URL that handles the media served from MEDIA_ROOT.
|
||||||
# Example: "http://media.lawrence.com"
|
# Example: "http://media.lawrence.com"
|
||||||
MEDIA_URL = '/media/'
|
MEDIA_URL = '/media/'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue