Simplify settings.py

This commit is contained in:
Nico Schottelius 2018-12-30 19:07:41 +01:00
parent d9ee4ffc80
commit 6012eab88d
3 changed files with 22 additions and 25 deletions

View File

@ -123,8 +123,27 @@ USE_TZ = True
STATIC_URL = '/static/'
DEBUG_DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
DEBUG = False
ALLOWED_HOSTS = [
".ungleich.ch"
]
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'app',
}
}
if "DEBUG" in os.environ:
from .local import * # flake8: noqa
else:
from .prod import * # flake8: noqa
DEBUG = True
ALLOWED_HOSTS = []
DATABASES = DEBUG_DATABASES

View File

@ -1,10 +0,0 @@
DEBUG = True
ALLOWED_HOSTS = []
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}

View File

@ -1,12 +0,0 @@
DEBUG = False
ALLOWED_HOSTS = [
".ungleich.ch"
]
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'app',
}
}