use named redirects for login/logout
This commit is contained in:
@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/2.1/ref/settings/
|
||||
"""
|
||||
|
||||
import os
|
||||
from django.urls import reverse_lazy
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
@ -103,9 +104,10 @@ USE_TZ = True
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/2.1/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
LOGIN_REDIRECT_URL = '/'
|
||||
LOGIN_REDIRECT_URL = reverse_lazy('home')
|
||||
LOGOUT_REDIRECT_URL = reverse_lazy('home')
|
||||
|
||||
# bring in ansible-defined settings
|
||||
from .settings_ansible import *
|
||||
|
||||
Reference in New Issue
Block a user