use reverse_lazy for URLs

This commit is contained in:
Andreas Zweili 2020-03-01 11:15:41 +01:00
parent db97a141d9
commit c159692445
1 changed files with 3 additions and 2 deletions

View File

@ -12,6 +12,7 @@ https://docs.djangoproject.com/en/2.0/ref/settings/
import os
import warnings
from django.urls import reverse_lazy
warnings.filterwarnings('ignore',
module='floppyforms',
@ -106,8 +107,8 @@ AUTHENTICATION_BACKENDS = (
# Internationalization
# https://docs.djangoproject.com/en/2.0/topics/i18n/
LOGIN_REDIRECT_URL = '/'
LOGOUT_REDIRECT_URL = 'login'
LOGIN_REDIRECT_URL = reverse_lazy('customers')
LOGOUT_REDIRECT_URL = reverse_lazy('login')
LANGUAGE_CODE = 'en-us'