From 6cc9890f5afe19b36eb5ebac5f4de4863402777f Mon Sep 17 00:00:00 2001 From: "Christopher C. Wells" Date: Fri, 24 Dec 2021 14:28:24 -0500 Subject: [PATCH] Use named patterns for settings URLs This should improve support for subdirectory hosted installations. --- babybuddy/settings/base.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/babybuddy/settings/base.py b/babybuddy/settings/base.py index 16bc9248..7f596d09 100644 --- a/babybuddy/settings/base.py +++ b/babybuddy/settings/base.py @@ -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