Added database to the config file

This commit is contained in:
Taizo 'Tsa6' Simpson 2017-09-21 17:20:40 -04:00
parent 02bd2e3294
commit 090ab138db
3 changed files with 9 additions and 4 deletions

View File

@ -10,6 +10,7 @@ For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/ https://docs.djangoproject.com/en/1.11/ref/settings/
""" """
import dj_database_url
import os import os
import configparser import configparser
import warnings import warnings
@ -86,10 +87,7 @@ WSGI_APPLICATION = 'EpisodesCommunity.wsgi.application'
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases # https://docs.djangoproject.com/en/1.11/ref/settings/#databases
DATABASES = { DATABASES = {
'default': { 'default': dj_database_url.parse(options.get("database", 'sqlite:///database.db'))
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
} }

View File

@ -1,3 +1,9 @@
[General] [General]
# You MUST change this for production. Not doing so is a major vulnerability # You MUST change this for production. Not doing so is a major vulnerability
secret_key=5up3r s3cr3t k3y secret_key=5up3r s3cr3t k3y
#Changes where the site stores it's data
#See https://github.com/kennethreitz/dj-database-url
#For configuration details
database=sqlite:///database.sqlite3

View File

@ -1,2 +1,3 @@
Django==1.11.4 Django==1.11.4
Pillow=4.2.1 Pillow=4.2.1
dj-database-url==0.4.2