51 lines
1.4 KiB
Python
51 lines
1.4 KiB
Python
"""Django and Aircox instance settings. This file should be saved as
|
|
`settings.py` in the same directory as this one.
|
|
|
|
User MUST define the following values: `SECRET_KEY`, `ALLOWED_HOSTS`, `DATABASES`
|
|
|
|
The following environment variables are used in settings:
|
|
* `AIRCOX_DEBUG` (`DEBUG`): enable/disable debugging
|
|
|
|
For Django settings see:
|
|
https://docs.djangoproject.com/en/3.1/topics/settings/
|
|
https://docs.djangoproject.com/en/3.1/ref/settings/
|
|
"""
|
|
from zoneinfo import ZoneInfo
|
|
from .prod import *
|
|
|
|
# FOR dev: from .dev import *
|
|
|
|
# Debug mode: set to True for dev
|
|
# DEBUG = False
|
|
LANGUAGE_CODE = "fr-BE"
|
|
LC_LOCALE = "fr_BE.UTF-8"
|
|
TIME_ZONE = "Europe/Brussels"
|
|
|
|
timezone.activate(ZoneInfo(TIME_ZONE))
|
|
|
|
# Secret key: you MUST put a consistent secret key. You can generate one
|
|
# at https://djecrety.ir/
|
|
SECRET_KEY = ""
|
|
|
|
# Database configuration: defaults to db.sqlite3
|
|
# DATABASES
|
|
|
|
# Allowed host for HTTP requests
|
|
# ALLOWED_HOSTS = ('127.0.0.1',)
|
|
# CSRF_TRUSTED_ORIGINS=['https://aircox.radiocampus.be', 'https://radiocampus.be']
|
|
|
|
# When LC_LOCALE is set here, this code activates it.
|
|
# Otherwise it can be removed
|
|
try:
|
|
import locale
|
|
|
|
locale.setlocale(locale.LC_ALL, LC_LOCALE)
|
|
except Exception:
|
|
print(
|
|
"Can not set locale {LC}. Is it available on you system? Hint: "
|
|
"Check /etc/locale.gen and rerun locale-gen as sudo if needed.".format(
|
|
LC=LANGUAGE_CODE
|
|
)
|
|
)
|
|
pass
|