Db config

This commit is contained in:
Oleg Lavrovsky 2017-03-28 00:43:55 +02:00
parent c64612bdba
commit f48aaabf09
2 changed files with 4 additions and 7 deletions

View file

@ -1,4 +1,3 @@
# web: uwsgi --http :$PORT --module=publichealth.wsgi:application --master --offload-threads 3
# web: gunicorn publichealth.wsgi -b 0.0.0.0:$PORT -w 5 --log-file=-
web: python manage.py runserver $PORT
web: gunicorn publichealth.wsgi:application -b 0.0.0.0:$PORT -w 5 --log-file=-
init: python manage.py migrate

View file

@ -14,6 +14,7 @@ https://docs.djangoproject.com/en/1.8/ref/settings/
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import dj_database_url
PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
BASE_DIR = os.path.dirname(PROJECT_DIR)
@ -95,10 +96,7 @@ WSGI_APPLICATION = 'publichealth.wsgi.application'
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'publichealth',
}
'default': dj_database_url.config()
}