Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Christopher M Reffett
whats-open
Commits
582d6416
Commit
582d6416
authored
Jan 29, 2013
by
Tyler Hallada
Browse files
Allow secret_key file to be missing if DEBUG on
parent
80ee0be8
Changes
1
Hide whitespace changes
Inline
Side-by-side
whats_open/settings.py
View file @
582d6416
# 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
=
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment