File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1313import os
1414
1515import raven
16+ import sys
1617from decouple import config
1718from dj_database_url import parse as dburl
1819
162163META_DEFAULT_KEYWORDS = ['PyCon' , 'Balkan' ]
163164META_SITE_DOMAIN = 'https://pyconbalkan.com/'
164165
166+ # Are we testing? i.e. was this code run via "manage.py test"
167+ TESTING = len (sys .argv ) > 1 and sys .argv [1 ] == 'test'
168+ # SSL redirect
169+ SECURE_SSL_REDIRECT = False if TESTING else True
170+
165171if DEBUG :
166172 # Storage
167173 DEFAULT_FILE_STORAGE = "pyconbalkan.core.storage.LocalStorage"
168174 # Email
169175 EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend'
170176 EMAIL_FILE_PATH = '/tmp/app-emails'
171177else :
172- # SSL redirect
173- SECURE_SSL_REDIRECT = True
174178 # Storage
175179 DEFAULT_FILE_STORAGE = "pyconbalkan.core.storage.S3Storage"
176180 # Email
You can’t perform that action at this time.
0 commit comments