Use Postgres

master
Paul Wagener 7 years ago
parent 5c8f930bbd
commit 0f8ac914f8
  1. 1
      .gitignore
  2. 1
      requirements.txt
  3. 4
      securityquiz/secrets.py.template
  4. 9
      securityquiz/settings.py

1
.gitignore vendored

@ -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
}
}

Loading…
Cancel
Save