1
0
Fork 0

Use new local settings system

This commit is contained in:
Adrien Abraham 2018-04-25 20:16:23 +02:00
parent eadd1846e1
commit daaff264a9
4 changed files with 14 additions and 4 deletions

3
.gitignore vendored
View file

@ -1,5 +1,6 @@
__pycache__/
idre/local_settings.py
idre/settings_local.py
media/
.idea/
*.code-workspace

8
idre/settings_dev.py Normal file
View file

@ -0,0 +1,8 @@
from .settings import * # pylint: disable=unused-wildcard-import
DEBUG = True
SECRET_KEY = 'dev'
ALLOWED_HOSTS = ['*']

View file

@ -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()

View file

@ -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