From daaff264a95e68e705ea823afab89385e8ceacc1 Mon Sep 17 00:00:00 2001 From: Adrien Abraham Date: Wed, 25 Apr 2018 20:16:23 +0200 Subject: [PATCH] Use new local settings system --- .gitignore | 3 ++- idre/settings_dev.py | 8 ++++++++ idre/wsgi.py | 2 +- manage.py | 5 +++-- 4 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 idre/settings_dev.py diff --git a/.gitignore b/.gitignore index f1338e3..05b0b69 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ __pycache__/ -idre/local_settings.py +idre/settings_local.py media/ .idea/ +*.code-workspace diff --git a/idre/settings_dev.py b/idre/settings_dev.py new file mode 100644 index 0000000..175946b --- /dev/null +++ b/idre/settings_dev.py @@ -0,0 +1,8 @@ +from .settings import * # pylint: disable=unused-wildcard-import + + +DEBUG = True + +SECRET_KEY = 'dev' + +ALLOWED_HOSTS = ['*'] diff --git a/idre/wsgi.py b/idre/wsgi.py index d63269e..696b72b 100644 --- a/idre/wsgi.py +++ b/idre/wsgi.py @@ -8,7 +8,7 @@ https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "idre.local_settings") +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'idre.settings_local') from django.core.wsgi import get_wsgi_application application = get_wsgi_application() diff --git a/manage.py b/manage.py index a6ac474..7b26c7c 100755 --- a/manage.py +++ b/manage.py @@ -2,8 +2,9 @@ import os import sys -if __name__ == "__main__": - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "idre.local_settings") + +if __name__ == '__main__': + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'idre.settings_local') from django.core.management import execute_from_command_line