Commit 582d6416 authored by Tyler Hallada's avatar Tyler Hallada
Browse files

Allow secret_key file to be missing if DEBUG on

parent 80ee0be8
# Django settings for whats_open project.
import os
import dj_database_url
import secret_key
DEBUG = True
TEMPLATE_DEBUG = DEBUG
......@@ -83,8 +82,16 @@ STATICFILES_FINDERS = (
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
# Make this unique, and don't share it with anybody.
SECRET_KEY = secret_key.SECRET_KEY
if DEBUG:
try:
import secret_key
SECRET_KEY = secret_key.SECRET_KEY
except ImportError:
# This is a test/local run so security doesn't matter
SECRET_KEY = "testtesttest"
else:
import secret_key
SECRET_KEY = secret_key.SECRET_KEY
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment