Django settings module that defines important configurations. For an explanation of all the listed values, see the official Django documentation.
Generally, the most important settings - but also as few as possible - should be fetched from environment variables. The settings are written such that errors are thrown when the required env vars are not present. This is by design, to ensure the host environment is configured for the application.
Only these env vars should need to be changed:
DJANGO_ENV
can take on the values"debug"
,"maintenance"
, or"production"
.DJANGO_SECRET_KEY
must contain the secret key for Django's security stuff.DJANGO_ALLOWED_HOSTS
needs to contain the allowed host names separated by spaces.DJANGO_LOG_LEVEL
for the log level. This only has an effect in debug mode.DJANGO_BASE_DIR
is the directory in which Django is based.
Function | set_ |
Return logging settings in the form of a dictionary as function of the log-level. This is used so that in a subdomain settings file the function can be called again to overwrite the logging settings easily. |
Constant | ALLOWED |
Space-separated list of hostnames for which django will accept requests. Can be set with the env var DJANGO_ALLOWED_HOSTS. |
Constant | AUTH |
Undocumented |
Constant | AUTH |
Undocumented |
Constant | BASE |
Setting the base dir manually is necessary, because otherwise everything might be set up relative to venv's site-packages. |
Constant | CRSF |
Undocumented |
Constant | CSRF |
Undocumented |
Constant | DATABASES |
Undocumented |
Constant | DBBACKUP |
Undocumented |
Constant | DBBACKUP |
Undocumented |
Constant | DEBUG |
True, when in debug mode, meaning DJANGO_ENV is set to "debug". |
Constant | DEFAULT |
Undocumented |
Constant | FROZEN |
Undocumented |
Constant | GITHUB |
Undocumented |
Constant | GITHUB |
Undocumented |
Constant | GITHUB |
Undocumented |
Constant | GITHUB |
Read-only GitHub access token for fetching information about lyprox.riskpredictor.models.InferenceResult . |
Constant | INSTALLED |
Undocumented |
Constant | IS |
Undocumented |
Constant | LANGUAGE |
Undocumented |
Constant | LOG |
Set the threshold for logging event when in DEBUG mode. During "maintenance" and "production" this is fixed to "WARNING". Set via the environment variable DJANGO_LOG_LEVEL. |
Constant | LOGGING |
Undocumented |
Constant | LOGIN |
List of regexes for urls that are exceptions from the LOGIN_REQUIRED_URLS . |
Constant | LOGIN |
Redirect to this URL after successful login. |
Constant | LOGIN |
List of regexes for urls that require login. |
Constant | LOGIN |
URL to redirect to when login is required. |
Constant | MAINTENANCE |
If True, all requests to are redirected to a maintenance page. DJANGO_ENV must be set to "maintenance" for this to work. Also see lyprox.views.maintenance . |
Constant | MEDIA |
Undocumented |
Constant | MEDIA |
Undocumented |
Constant | MIDDLEWARE |
Undocumented |
Constant | PRODUCTION |
Set DJANGO_ENV to "production" to disable DEBUG and MAINTENANCE modes. |
Constant | PUBLICATIONS |
Undocumented |
Constant | ROOT |
Undocumented |
Constant | SECRET |
Secret key for cryptographic functions. This is the most sensitive information about the application. It is set via the environment variable DJANGO_SECRET_KEY. |
Constant | SECURE |
Undocumented |
Constant | SECURE |
Undocumented |
Constant | SECURE |
Undocumented |
Constant | SECURE |
Undocumented |
Constant | SESSION |
Undocumented |
Constant | STATIC |
Undocumented |
Constant | STATIC |
Undocumented |
Constant | STATICFILES |
Undocumented |
Constant | TEMPLATES |
Undocumented |
Constant | TIME |
Undocumented |
Constant | USE |
Undocumented |
Constant | USE |
Undocumented |
Constant | USE |
Undocumented |
Variable | _login |
Undocumented |
Return logging settings in the form of a dictionary as function of the log-level. This is used so that in a subdomain settings file the function can be called again to overwrite the logging settings easily.
Space-separated list of hostnames for which django will accept requests. Can be set with the env var DJANGO_ALLOWED_HOSTS.
Value |
|
Undocumented
Value |
|
Setting the base dir manually is necessary, because otherwise everything might be set up relative to venv's site-packages.
Value |
|
Undocumented
Value |
|
True, when in debug mode, meaning DJANGO_ENV is set to "debug".
Value |
|
Read-only GitHub access token for fetching information about
lyprox.riskpredictor.models.InferenceResult
.
Value |
|
Undocumented
Value |
|
Set the threshold for logging event when in DEBUG
mode. During "maintenance"
and "production" this is fixed to "WARNING". Set via the environment variable
DJANGO_LOG_LEVEL.
Value |
|
List of regexes for urls that are exceptions from the LOGIN_REQUIRED_URLS
.
Value |
|
List of regexes for urls that require login.
Note that this may simply be left empty, since the critical views are protected by default. But if you want to protect e.g. the entire website, you can add "(.*)$" to the list.
Value |
|
If True, all requests to are redirected to a maintenance page. DJANGO_ENV must
be set to "maintenance" for this to work. Also see lyprox.views.maintenance
.
Value |
|
Undocumented
Value |
|
Set DJANGO_ENV to "production" to disable DEBUG
and MAINTENANCE
modes.
Value |
|
Secret key for cryptographic functions. This is the most sensitive information about the application. It is set via the environment variable DJANGO_SECRET_KEY.
Value |
|
Undocumented
Value |
|