Use Postgres

This commit is contained in:
Paul committed 2018-10-01 21:17:02 +02:00
1 parent 5c8f930bbd
commit 0f8ac914f8
4 files changed
+14 -3

No files matched your search

+1
View File
@@ -2,3 +2,4 @@
__pycache__
/venv
db.sqlite3
/securityquiz/secrets.py
+2 -1
View File
@@ -1,4 +1,5 @@
django
django-oauth-toolkit
django-cors-headers
pyopenssl
pyopenssl
psycopg2
+4
View File
@@ -0,0 +1,4 @@
DB_HOST = ''
DB_NAME = ''
DB_USER = ''
DB_PASSWORD = ''
+7 -2
View File
@@ -11,6 +11,8 @@ https://docs.djangoproject.com/en/1.6/ref/settings/
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import sys
from . import secrets
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
CLOSED = False
@@ -65,8 +67,11 @@ WSGI_APPLICATION = 'securityquiz.wsgi.application'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'ENGINE': 'django.db.backends.postgresql',
'NAME': secrets.DB_NAME,
'USER': secrets.DB_USER,
'PASSWORD': secrets.DB_PASSWORD,
'HOST': secrets.DB_HOST
}
}