diff --git a/requirements.txt b/requirements.txt index 912195b..a7efbfe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,6 +9,7 @@ django-debug-toolbar==0.11.0 django-extensions==1.2.5 django-markdown-deux==1.0.4 django-pagination==1.0.7 +django-sslify>=0.2 django-storages==1.1.5 django-taggit==0.10 django-tastypie==0.10.0 diff --git a/settings.py b/settings.py index cccdaa9..0d0b739 100644 --- a/settings.py +++ b/settings.py @@ -78,7 +78,7 @@ STATICFILES_FINDERS = ('django.contrib.staticfiles.finders.FileSystemFinder','dj STATIC_ROOT = os.path.join(BASE_PATH, 'static') STATIC_URL = 'https://snipt.s3.amazonaws.com/' TASTYPIE_CANNED_ERROR = "There was an error with your request. The site developers have a record of this error, please email api@snipt.net and we'll help you out." -TEMPLATE_DIRS = (os.path.join(PROJECT_PATH, 'templates')) +TEMPLATE_DIRS = (os.path.join(PROJECT_PATH, 'templates'),) TEMPLATE_DEBUG = DEBUG TIME_ZONE = 'America/New_York' USE_HTTPS = True if 'USE_SSL' in os.environ else False @@ -126,6 +126,7 @@ LOGGING = { 'loggers': {} } MIDDLEWARE_CLASSES = ( + 'sslify.middleware.SSLifyMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', diff --git a/settings_local.py-template b/settings_local.py-template index 9c63c9d..f08d1af 100644 --- a/settings_local.py-template +++ b/settings_local.py-template @@ -5,3 +5,4 @@ DEBUG=True S3_URL = 'https://%s.s3.amazonaws.com/' % AWS_STORAGE_BUCKET_NAME STATICFILES_STORAGE = 'storages.backends.s3boto.S3BotoStorage' STATIC_URL = '/static/' +SSLIFY_DISABLE = True