Force ssl
This commit is contained in:
parent
d9242181c8
commit
df10c67999
2 changed files with 11 additions and 9 deletions
|
@ -24,19 +24,20 @@ ALLOWED_HOSTS = ['*']
|
||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
INSTALLED_APPS = (
|
INSTALLED_APPS = (
|
||||||
'django.contrib.contenttypes',
|
'django.contrib.contenttypes',
|
||||||
'django.contrib.sessions',
|
'django.contrib.sessions',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
'app',
|
'app',
|
||||||
)
|
)
|
||||||
|
|
||||||
MIDDLEWARE_CLASSES = (
|
MIDDLEWARE_CLASSES = (
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
'sslify.middleware.SSLifyMiddleware',
|
||||||
'django.middleware.common.CommonMiddleware',
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
|
'django.middleware.common.CommonMiddleware',
|
||||||
)
|
)
|
||||||
|
|
||||||
TEMPLATE_DIRS = (
|
TEMPLATE_DIRS = (
|
||||||
os.path.join(BASE_DIR, 'app/templates'),
|
os.path.join(BASE_DIR, 'app/templates'),
|
||||||
)
|
)
|
||||||
|
|
||||||
ROOT_URLCONF = 'project.urls'
|
ROOT_URLCONF = 'project.urls'
|
||||||
|
@ -50,7 +51,7 @@ SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
||||||
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
|
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
|
||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': dj_database_url.config()
|
'default': dj_database_url.config()
|
||||||
}
|
}
|
||||||
|
|
||||||
# Internationalization
|
# Internationalization
|
||||||
|
@ -73,5 +74,5 @@ STATIC_ROOT = 'staticfiles'
|
||||||
STATIC_URL = '/static/'
|
STATIC_URL = '/static/'
|
||||||
|
|
||||||
STATICFILES_DIRS = (
|
STATICFILES_DIRS = (
|
||||||
os.path.join(BASE_DIR, 'static'),
|
os.path.join(BASE_DIR, 'static'),
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
dj-database-url==0.3.0
|
dj-database-url==0.3.0
|
||||||
dj-static==0.0.6
|
dj-static==0.0.6
|
||||||
Django==1.7.3
|
Django==1.7.3
|
||||||
|
django-sslify==0.2.5
|
||||||
django-toolbelt==0.0.1
|
django-toolbelt==0.0.1
|
||||||
gunicorn==19.1.1
|
gunicorn==19.1.1
|
||||||
psycopg2==2.5.4
|
psycopg2==2.5.4
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue