@@ -8,17 +8,15 @@ BASE_DIR = PACKAGE_ROOT
DEBUG = bool(int(os.environ.get("DJANGO_DEBUG", "1")))
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": os.path.join(PROJECT_ROOT, "dev.db"),
}
# HEROKU: Update database configuration with $DATABASE_URL.
DATABASES = {"default": {}}
import dj_database_url
db_from_env = dj_database_url.config()
DATABASES['default'].update(db_from_env)
if DEBUG and not DATABASES['default']:
DATABASES['default'] = {
ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS", "localhost").split()
CANONICAL_HOST = os.environ.get("DJANGO_CANONICAL_HOST", None)
@@ -95,7 +93,9 @@ STATICFILES_FINDERS = [
]
# Make this unique, and don't share it with anybody.
SECRET_KEY = "6r&z0i#!k-thu4nv^zzx!f$fbp(i5mq_^%%@ihu_qxxotl_"
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', '').strip()
if (not SECRET_KEY) and DEBUG:
SECRET_KEY = 'Ae=)D4\V=OFh~C63MJHgpc&6~"p-7>^2ux3#Cr;p^!RGw9.BT}U`pi|b04TDv_NB'
TEMPLATES = [
{