mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-08-07 02:48:27 +02:00
Add support for context path (#313)
* Add support for context path add an optional environment variable: LD_CONTEXT_PATH * Fix for pull request code review comments Co-authored-by: s2marine <s2marine@gmail.com>
This commit is contained in:
@@ -107,9 +107,12 @@ AUTH_PASSWORD_VALIDATORS = [
|
||||
},
|
||||
]
|
||||
|
||||
LOGIN_URL = '/login'
|
||||
LOGIN_REDIRECT_URL = '/bookmarks'
|
||||
LOGOUT_REDIRECT_URL = '/login'
|
||||
# Website context path.
|
||||
LD_CONTEXT_PATH = os.getenv('LD_CONTEXT_PATH', '')
|
||||
|
||||
LOGIN_URL = '/' + LD_CONTEXT_PATH + 'login'
|
||||
LOGIN_REDIRECT_URL = '/' + LD_CONTEXT_PATH + 'bookmarks'
|
||||
LOGOUT_REDIRECT_URL = '/' + LD_CONTEXT_PATH + 'login'
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/2.2/topics/i18n/
|
||||
@@ -127,7 +130,7 @@ USE_TZ = True
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/2.2/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
STATIC_URL = '/' + LD_CONTEXT_PATH + 'static/'
|
||||
|
||||
# Collect static files in static folder
|
||||
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
|
||||
|
Reference in New Issue
Block a user