use named redirects for login/logout

This commit is contained in:
Seth Ladygo
2019-03-12 23:05:11 -07:00
parent 22ead8dcf3
commit c43bb31d61

View File

@ -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 *