Changeset - 0a88ccce1810
[Not reviewed]
0 2 0
Christopher Neugebauer - 7 years ago 2017-08-16 03:07:45
chrisjrn@gmail.com
Adds environment variables to always serve over HTTPS
2 files changed with 8 insertions and 0 deletions:
0 comments (0 inline, 0 general)
pinaxcon/settings.py
Show inline comments
...
 
@@ -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"
requirements/base.txt
Show inline comments
...
 
@@ -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
0 comments (0 inline, 0 general)