diff --git a/.env.sample b/.env.sample index b2c9da52..df536080 100644 --- a/.env.sample +++ b/.env.sample @@ -6,6 +6,7 @@ HOST_NAME=db DB_PORT=5432 BROKER_URL=redis://redis:6379/0 CELERY_RESULT_BACKEND=redis://redis:6379/0 +SITE_PREFIX= SITE_NAME=junction SERVER_PORT=8888 GOOGLE_ANALYTICS_ID=google_analytics_id diff --git a/settings/common.py b/settings/common.py index 1f6945b3..135db8e1 100644 --- a/settings/common.py +++ b/settings/common.py @@ -156,7 +156,6 @@ ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https" EMAIL_SUBJECT_PREFIX = ACCOUNT_EMAIL_SUBJECT_PREFIX -LOGIN_REDIRECT_URL = "/" # E-Mail Settings EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" @@ -212,12 +211,18 @@ USE_L10N = True USE_TZ = True -STATIC_URL = "/static/" +SITE_PREFIX = os.environ.get("SITE_PREFIX", "") +STATIC_URL = SITE_PREFIX + "/static" STATIC_ROOT = os.path.join(APP_DIR, "assets", "collected-static") STATICFILES_DIRS = (os.path.join(APP_DIR, "static"),) MEDIA_ROOT = join(ROOT_DIR, ".media") -MEDIA_URL = "/m/" +MEDIA_URL = SITE_PREFIX + "/m/" + +LOGIN_URL = SITE_PREFIX + '/accounts/login/' +LOGOUT_URL = SITE_PREFIX + '/accounts/logout/' + +LOGIN_REDIRECT_URL = SITE_PREFIX + "/" DATABASES = {