Add Django local parameters
This commit is contained in:
parent
10dac73146
commit
74a5cf7cbf
1
.gitignore
vendored
1
.gitignore
vendored
@ -33,6 +33,7 @@ coverage
|
||||
|
||||
# Local data
|
||||
secrets.py
|
||||
settings_local.py
|
||||
*.log
|
||||
media/
|
||||
output/
|
||||
|
@ -22,7 +22,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = "django-insecure-&900+#-_$xydt$nz3xe_6pe&*f#=7hiqal6@ndtt7v2oixhu@y"
|
||||
SECRET_KEY = "CHANGE ME"
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
@ -135,7 +135,9 @@ USE_TZ = True
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/5.0/howto/static-files/
|
||||
|
||||
STATIC_URL = "static/"
|
||||
STATIC_URL = "api-static/"
|
||||
|
||||
STATIC_ROOT = BASE_DIR / "static_files"
|
||||
|
||||
# Default primary key field type
|
||||
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field
|
||||
@ -147,3 +149,9 @@ REST_FRAMEWORK = {
|
||||
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',
|
||||
'PAGE_SIZE': 20,
|
||||
}
|
||||
|
||||
|
||||
try:
|
||||
from settings_local import *
|
||||
except ImportError:
|
||||
pass
|
||||
|
20
sncf/settings_local_example.py
Normal file
20
sncf/settings_local_example.py
Normal file
@ -0,0 +1,20 @@
|
||||
SECRET_KEY = "CHANGE ME"
|
||||
|
||||
DEBUG = False
|
||||
|
||||
ALLOW_HOSTS = ['sncf.emy.lu']
|
||||
|
||||
CORS_ALLOWED_ORIGINS = [
|
||||
"https://sncf.emy.lu",
|
||||
]
|
||||
|
||||
DATABASES = {
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.postgresql",
|
||||
"NAME": "sncf",
|
||||
"USER": "sncf",
|
||||
"PASSWORD": "CHANGE ME",
|
||||
"HOST": "localhost",
|
||||
"PORT": "5432",
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user