Introduce BASE_URL, make LOGIN_URL and STATIC_URL work with subpath

This commit is contained in:
puuu 2021-05-14 14:20:05 +09:00
parent c35c4eade9
commit e792a00feb

View File

@ -142,11 +142,13 @@ MIDDLEWARE = [
ROOT_URLCONF = 'paperless.urls'
FORCE_SCRIPT_NAME = os.getenv("PAPERLESS_FORCE_SCRIPT_NAME")
BASE_URL = (FORCE_SCRIPT_NAME or "") + "/"
LOGIN_URL = BASE_URL + "accounts/login/"
WSGI_APPLICATION = 'paperless.wsgi.application'
ASGI_APPLICATION = "paperless.asgi.application"
STATIC_URL = os.getenv("PAPERLESS_STATIC_URL", "/static/")
STATIC_URL = os.getenv("PAPERLESS_STATIC_URL", "static/")
# TODO: what is this used for?
TEMPLATES = [