Add support for local_settings.py

This commit is contained in:
2022-07-10 23:31:37 +02:00
parent 7c88983cba
commit 565028de72
2 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
# vim: syntax=python
"""
Django local_settings for ram project.
"""
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = (
"django-insecure-1fgtf05rwp0qp05@ef@a7%x#o+t6vk6063py=vhdmut0j!8s4u"
)
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
STORAGE_DIR = BASE_DIR / "storage"
ALLOWED_HOSTS = ["127.0.0.1"]
CSRF_TRUSTED_ORIGINS = ["https://myhost"]
ROOT_URLCONF = "ram.urls"
STATIC_URL = "static/"
MEDIA_URL = "media/"

View File

@@ -161,3 +161,10 @@ ROLLING_STOCK_TYPES = [
("equipment", "Equipment"), ("equipment", "Equipment"),
("other", "Other"), ("other", "Other"),
] ]
try:
from ram.local_settings import *
except ImportError:
# If a local_setting.py does not exist
# settings in this file only will be used
pass