Changeset - 05ddedc19d55
[Not reviewed]
Merge
0 5 0
Christopher Neugebauer - 7 years ago 2017-08-16 03:40:18
_@chrisjrn.com
Merge pull request #56 from northbaypython/chrisjrn/herokize

Adds heroku support for ssl-everywhere and S3 uploads
2 files changed with 19 insertions and 1 deletions:
0 comments (0 inline, 0 general)
pinaxcon/settings.py
Show inline comments
...
 
@@ -30,5 +30,10 @@ ALLOWED_HOSTS = ["localhost", ".herokuapp.com", ".northbaypython.org"]
 
# If running in a Windows environment this must be set to the same as your
 
# system time zone.
 
TIME_ZONE = "UTC"
 
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:
...
 
@@ -81,4 +86,12 @@ STATICFILES_FINDERS = [
 
]
 

	
 

	
 
# Amazon S3 setup
 
DEFAULT_FILE_STORAGE = os.environ.get("DJANGO_DEFAULT_FILE_STORAGE", 'django.core.files.storage.FileSystemStorage') # noqa
 
AWS_ACCESS_KEY_ID = os.environ.get("DJANGO_AWS_ACCESS_KEY_ID", None)
 
AWS_SECRET_ACCESS_KEY = os.environ.get("DJANGO_AWS_SECRET_ACCESS_KEY", None)
 
AWS_STORAGE_BUCKET_NAME = os.environ.get("DJANGO_AWS_STORAGE_BUCKET_NAME", None)
 

	
 

	
 
# Make this unique, and don't share it with anybody.
 
SECRET_KEY = "6r&z0i#!k-thu4nv^zzx!f$fbp(&#2i5mq_^%%@ihu_qxxotl_"
...
 
@@ -119,4 +132,6 @@ MIDDLEWARE_CLASSES = [
 
    "reversion.middleware.RevisionMiddleware",
 
    "django.middleware.clickjacking.XFrameOptionsMiddleware",
 
    "ssl_redirect.middleware.SSLRedirectMiddleware",
 

	
 
]
 

	
requirements/base.txt
Show inline comments
 
Django>=1.11,<1.12
 
boto3==1.4.6
 
pinax-theme-bootstrap==7.3.0
 
django-user-accounts==1.3.1
...
 
@@ -8,4 +9,6 @@ dj-database-url==0.4.0
 
pinax-pages==0.4.2
 
pinax-boxes==2.1.2
 
django-ssl-redirect==2.0
 
django-storages==1.6.5
 
django-libsass==0.7
 
django-markdown-deux==1.0.5
0 comments (0 inline, 0 general)