Use named patterns for settings URLs

This should improve support for subdirectory hosted installations.
This commit is contained in:
Christopher C. Wells 2021-12-24 14:28:24 -05:00
parent c8ed066806
commit 6cc9890f5a
1 changed files with 5 additions and 5 deletions

View File

@ -143,11 +143,11 @@ AUTHENTICATION_BACKENDS = [
'django.contrib.auth.backends.ModelBackend',
]
LOGIN_REDIRECT_URL = ''
LOGIN_REDIRECT_URL = 'babybuddy:root-router'
LOGIN_URL = 'login/'
LOGIN_URL = 'babybuddy:login'
LOGOUT_REDIRECT_URL = 'login/'
LOGOUT_REDIRECT_URL = 'babybuddy:login'
# Timezone
@ -209,7 +209,7 @@ STATICFILES_FINDERS = [
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
]
STATIC_URL = '/static/'
STATIC_URL = 'static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
@ -221,7 +221,7 @@ WHITENOISE_ROOT = os.path.join(BASE_DIR, 'static', 'babybuddy', 'root')
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'
MEDIA_URL = 'media/'
AWS_STORAGE_BUCKET_NAME = os.environ.get('AWS_STORAGE_BUCKET_NAME') or None