File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8080# https://docs.djangoproject.com/en/1.6/howto/static-files/
8181
8282STATIC_URL = '/static/'
83+
84+
85+ # Parse database configuration from $DATABASE_URL
86+ import dj_database_url
87+ DATABASES ['default' ] = dj_database_url .config ()
88+
89+ # Honor the 'X-Forwarded-Proto' header for request.is_secure()
90+ SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO' , 'https' )
91+
92+ # Allow all host headers
93+ ALLOWED_HOSTS = ['*' ]
94+
95+ # Static asset configuration
96+ import os
97+ BASE_DIR = os .path .dirname (os .path .abspath (__file__ ))
98+ STATIC_ROOT = 'staticfiles'
99+ STATIC_URL = '/static/'
100+
101+ STATICFILES_DIRS = (
102+ os .path .join (BASE_DIR , 'static' ),
103+ )
Original file line number Diff line number Diff line change 1111os .environ .setdefault ("DJANGO_SETTINGS_MODULE" , "gettingstarted.settings" )
1212
1313from django .core .wsgi import get_wsgi_application
14- application = get_wsgi_application ()
14+ from dj_static import Cling
15+
16+ application = Cling (get_wsgi_application ())
Original file line number Diff line number Diff line change 1+ Django == 1.6.5
2+ dj-database-url == 0.3.0
3+ dj-static == 0.0.6
4+ django-toolbelt == 0.0.1
5+ gunicorn == 19.0.0
6+ psycopg2 == 2.5.3
7+ static3 == 0.5.1
8+ wsgiref == 0.1.2
Original file line number Diff line number Diff line change 1+ python-2.7.8
You can’t perform that action at this time.
0 commit comments