From 1add5f3e35defa92d512a18cbcde4b2ad066d710 Mon Sep 17 00:00:00 2001 From: Benjamin Bach Date: Sat, 23 Jun 2018 15:31:24 +0200 Subject: [PATCH] New settings layout --- .gitignore | 1 + membersystem/settings/__init__.py | 10 ++++++++++ membersystem/{settings.py => settings/base.py} | 3 --- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 membersystem/settings/__init__.py rename membersystem/{settings.py => settings/base.py} (96%) diff --git a/.gitignore b/.gitignore index d8b1a3f..976eaca 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ __pycache__/ *.pyc *.sw* db.sqlite3 +membersystem/settings/local.py diff --git a/membersystem/settings/__init__.py b/membersystem/settings/__init__.py new file mode 100644 index 0000000..166c847 --- /dev/null +++ b/membersystem/settings/__init__.py @@ -0,0 +1,10 @@ +import warnings + +from .base import * + +try: + from .local import * +except ImportError: + warnings.warn("No settings.local, using a default SECRET_KEY 'hest'") + SECRET_KEY = "hest" + pass \ No newline at end of file diff --git a/membersystem/settings.py b/membersystem/settings/base.py similarity index 96% rename from membersystem/settings.py rename to membersystem/settings/base.py index 794dc11..f2a31f3 100644 --- a/membersystem/settings.py +++ b/membersystem/settings/base.py @@ -19,9 +19,6 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/ -# SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = '=z5+m4xt$)a#l-*d50vta1vnnho250h3up9o+$c@)ztf8ahw3q' - # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True