Commit 9ef15a44 authored by Renfred Harper's avatar Renfred Harper
Browse files

Update settings.py for django 1.5.4 compatibillity

parent b745b34d
...@@ -4,9 +4,8 @@ import os ...@@ -4,9 +4,8 @@ import os
DEBUG = True DEBUG = True
TEMPLATE_DEBUG = DEBUG TEMPLATE_DEBUG = DEBUG
ADMINS = ( # Insert a ('Name', 'Email') inside ADMINS tuple
('Tyler Hallada', 'thallada@gmu.edu'), ADMINS = ('Your Name', 'youremail@example.com')
)
MANAGERS = ADMINS MANAGERS = ADMINS
...@@ -19,6 +18,10 @@ DATABASES = { ...@@ -19,6 +18,10 @@ DATABASES = {
} }
} }
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ['*']
# Local time zone for this installation. Choices can be found here: # Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems. # although not all choices may be available on all operating systems.
...@@ -78,16 +81,14 @@ STATICFILES_FINDERS = ( ...@@ -78,16 +81,14 @@ STATICFILES_FINDERS = (
# 'django.contrib.staticfiles.finders.DefaultStorageFinder', # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
) )
# Make this unique, and don't share it with anybody.
SECRET_KEY = ''
if DEBUG: if DEBUG:
try: # This is a test/local run so security doesn't matter
import secret_key SECRET_KEY = "testtesttest"
SECRET_KEY = secret_key.SECRET_KEY elif SECRET_KEY == '':
except ImportError: raise AssertionError("Must enter unique value for SECRET_KEY setting")
# 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. # List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = ( TEMPLATE_LOADERS = (
...@@ -113,6 +114,9 @@ WSGI_APPLICATION = 'whats_open.wsgi.application' ...@@ -113,6 +114,9 @@ WSGI_APPLICATION = 'whats_open.wsgi.application'
TEMPLATE_DIRS = ( TEMPLATE_DIRS = (
os.path.join(PROJECT_PATH, 'templates'), os.path.join(PROJECT_PATH, 'templates'),
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
) )
INSTALLED_APPS = ( INSTALLED_APPS = (
...@@ -130,6 +134,8 @@ INSTALLED_APPS = ( ...@@ -130,6 +134,8 @@ INSTALLED_APPS = (
'website', 'website',
) )
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
# A sample logging configuration. The only tangible logging # A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to # performed by this configuration is to send an email to
# the site admins on every HTTP 500 error when DEBUG=False. # the site admins on every HTTP 500 error when DEBUG=False.
......
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