import dev_settings in settings.py; not the other way

development settings should be imported to settings.py 
development settings differ from one developer to anoteher so they shouldn't be tracked
This commit is contained in:
juliusbentz 2018-10-09 22:49:05 +02:00
parent 1c18111c5a
commit 0acdf08ff0
3 changed files with 6 additions and 17 deletions

1
.gitignore vendored
View file

@ -14,3 +14,4 @@ main.css.map
ref.css
ref.css.map
.coverage
crm/dev_settings\.py

View file

@ -1,17 +0,0 @@
from .settings import *
# Database
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
ALLOWED_HOSTS = ['*']
DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'postgres',
'USER': 'postgres',
'HOST': 'db',
'PORT': 5432,
}
}

View file

@ -185,3 +185,8 @@ SG_PWD = os.getenv('SG_PWD', '')
MANDRILL_API_KEY = os.getenv('MANDRILL_API_KEY', '')
ADMIN_EMAIL = "admin@micropyramid.com"
try:
from .dev_settings import *
except ImportError:
pass