Adds environment variables to always serve over HTTPS

This commit is contained in:
Christopher Neugebauer 2017-08-15 20:07:45 -07:00
parent f4ab6d6874
commit 0a88ccce18
2 changed files with 8 additions and 0 deletions

View file

@ -31,6 +31,11 @@ ALLOWED_HOSTS = ["localhost", ".herokuapp.com", ".northbaypython.org"]
# system time zone.
TIME_ZONE = os.environ.get("TZ", "America/Los_Angeles")
# Use SSLRedirectMiddleware
SSL_ON = os.environ.get("DJANGO_SSL_ON", True)
SSL_ALWAYS = os.environ.get("DJANGO_SSL_ALWAYS", False)
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = "en-us"
@ -118,6 +123,8 @@ MIDDLEWARE_CLASSES = [
"django.contrib.messages.middleware.MessageMiddleware",
"reversion.middleware.RevisionMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"ssl_redirect.middleware.SSLRedirectMiddleware",
]
ROOT_URLCONF = "pinaxcon.urls"

View file

@ -7,6 +7,7 @@ dj-static==0.0.6
dj-database-url==0.4.0
pinax-pages==0.4.2
pinax-boxes==2.1.2
django-ssl-redirect==2.0
django-libsass==0.7
django-markdown-deux==1.0.5
django-sitetree==1.8.0