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__
|
__pycache__
|
||||||
/venv
|
/venv
|
||||||
db.sqlite3
|
db.sqlite3
|
||||||
|
/securityquiz/secrets.py
|
||||||
@@ -2,3 +2,4 @@ django
|
|||||||
django-oauth-toolkit
|
django-oauth-toolkit
|
||||||
django-cors-headers
|
django-cors-headers
|
||||||
pyopenssl
|
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, ...)
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
from . import secrets
|
||||||
|
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
|
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
|
||||||
|
|
||||||
CLOSED = False
|
CLOSED = False
|
||||||
@@ -65,8 +67,11 @@ WSGI_APPLICATION = 'securityquiz.wsgi.application'
|
|||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
'default': {
|
||||||
'ENGINE': 'django.db.backends.sqlite3',
|
'ENGINE': 'django.db.backends.postgresql',
|
||||||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
'NAME': secrets.DB_NAME,
|
||||||
|
'USER': secrets.DB_USER,
|
||||||
|
'PASSWORD': secrets.DB_PASSWORD,
|
||||||
|
'HOST': secrets.DB_HOST
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user