Skip to content

Commit 6ba7fc3

Browse files
author
Jon Mountjoy
committed
mm
1 parent 1db9cf1 commit 6ba7fc3

4 files changed

Lines changed: 33 additions & 1 deletion

File tree

gettingstarted/settings.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,24 @@
8080
# https://docs.djangoproject.com/en/1.6/howto/static-files/
8181

8282
STATIC_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+
)

gettingstarted/wsgi.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@
1111
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gettingstarted.settings")
1212

1313
from 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())

requirements.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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

runtime.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python-2.7.8

0 commit comments

Comments
 (0)