Simplify settings.py
This commit is contained in:
parent
d9ee4ffc80
commit
6012eab88d
3 changed files with 22 additions and 25 deletions
|
@ -123,8 +123,27 @@ USE_TZ = True
|
||||||
|
|
||||||
STATIC_URL = '/static/'
|
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:
|
if "DEBUG" in os.environ:
|
||||||
from .local import * # flake8: noqa
|
DEBUG = True
|
||||||
else:
|
ALLOWED_HOSTS = []
|
||||||
from .prod import * # flake8: noqa
|
|
||||||
|
DATABASES = DEBUG_DATABASES
|
|
@ -1,10 +0,0 @@
|
||||||
DEBUG = True
|
|
||||||
|
|
||||||
ALLOWED_HOSTS = []
|
|
||||||
|
|
||||||
DATABASES = {
|
|
||||||
'default': {
|
|
||||||
'ENGINE': 'django.db.backends.sqlite3',
|
|
||||||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
DEBUG = False
|
|
||||||
|
|
||||||
ALLOWED_HOSTS = [
|
|
||||||
".ungleich.ch"
|
|
||||||
]
|
|
||||||
|
|
||||||
DATABASES = {
|
|
||||||
'default': {
|
|
||||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
|
||||||
'NAME': 'app',
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue