forked from rc/aircox
- !88 pytest on existing tests - !89 reorganise settings (! see notes for deployment) Co-authored-by: bkfox <thomas bkfox net> Reviewed-on: rc/aircox#92
This commit is contained in:
43
instance/settings/sample.py
Normal file
43
instance/settings/sample.py
Normal file
@ -0,0 +1,43 @@
|
||||
"""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/
|
||||
"""
|
||||
|
||||
# Debug mode: set to True for dev
|
||||
# DEBUG = False
|
||||
LANGUAGE_CODE = "fr-BE"
|
||||
LC_LOCALE = "fr_BE.UTF-8"
|
||||
|
||||
# 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',)
|
||||
|
||||
|
||||
# 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
|
Reference in New Issue
Block a user