Fixes incorrect LOGIN_URL and LOGOUT_URL by means of reverse_lazy call.

This commit is contained in:
Johnny 2018-10-05 19:01:38 +00:00
parent ae84ba0ed2
commit dc1c8bb9a6

View file

@ -13,6 +13,7 @@ always be sure of what you have changed and what is default behaviour.
"""
from builtins import range
from django.urls import reverse_lazy
import os
import sys
@ -697,9 +698,9 @@ ROOT_URLCONF = 'web.urls'
# Where users are redirected after logging in via contrib.auth.login.
LOGIN_REDIRECT_URL = '/'
# 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.
LOGOUT_URL = '/accounts/login'
LOGOUT_URL = reverse_lazy('logout')
# URL that handles the media served from MEDIA_ROOT.
# Example: "http://media.lawrence.com"
MEDIA_URL = '/media/'