@@ -12,18 +12,20 @@ DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": os.path.join(PROJECT_ROOT, "dev.db"),
}
UNPREPEND_WWW = bool(os.environ.get("DJANGO_UNPREPEND_WWW", False))
# HEROKU: Update database configuration with $DATABASE_URL.
import dj_database_url
db_from_env = dj_database_url.config()
DATABASES['default'].update(db_from_env)
ALLOWED_HOSTS = ["localhost", ".herokuapp.com", ".northbaypython.org"]
ALLOWED_HOSTS = [".localhost", ".herokuapp.com", ".northbaypython.org"]
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# On Unix systems, a value of None will cause Django to use the same
# timezone as the operating system.
@@ -129,12 +131,13 @@ MIDDLEWARE_CLASSES = [
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.auth.middleware.SessionAuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"reversion.middleware.RevisionMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"ssl_redirect.middleware.SSLRedirectMiddleware",
"pinaxcon.middleware.UnprependWWWMiddleware",
]
ROOT_URLCONF = "pinaxcon.urls"
# Python dotted path to the WSGI application used by Django's runserver.