Use Postgres
This commit is contained in:
1 parent
5c8f930bbd
commit
0f8ac914f8
4 files changed
+13
-2
No files matched your search
@@ -2,3 +2,4 @@
|
||||
__pycache__
|
||||
/venv
|
||||
db.sqlite3
|
||||
/securityquiz/secrets.py
|
||||
@@ -2,3 +2,4 @@ django
|
||||
django-oauth-toolkit
|
||||
django-cors-headers
|
||||
pyopenssl
|
||||
psycopg2
|
||||
@@ -0,0 +1,4 @@
|
||||
DB_HOST = ''
|
||||
DB_NAME = ''
|
||||
DB_USER = ''
|
||||
DB_PASSWORD = ''
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user