Commit ff89eb8c4c1a868661859d6852ddd1974faa6b6e
1 parent
1b549bf9
Exists in
master
and in
5 other branches
added whitenoise package and modified settings for serving static files heroku
Showing
3 changed files
with
14 additions
and
2 deletions
Show diff stats
amadeus/settings.py
@@ -142,8 +142,11 @@ USE_TZ = True | @@ -142,8 +142,11 @@ USE_TZ = True | ||
142 | 142 | ||
143 | STATIC_URL = '/static/' | 143 | STATIC_URL = '/static/' |
144 | 144 | ||
145 | +#Static files heroku | ||
146 | +STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') | ||
147 | + | ||
145 | STATICFILES_DIRS = [ | 148 | STATICFILES_DIRS = [ |
146 | - os.path.join(BASE_DIR, "static"), | 149 | + os.path.join(BASE_DIR, "static") |
147 | ] | 150 | ] |
148 | 151 | ||
149 | # Files | 152 | # Files |
amadeus/wsgi.py
@@ -10,7 +10,9 @@ https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ | @@ -10,7 +10,9 @@ https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ | ||
10 | import os | 10 | import os |
11 | 11 | ||
12 | from django.core.wsgi import get_wsgi_application | 12 | from django.core.wsgi import get_wsgi_application |
13 | +from whitenoise.django import DjangoWhiteNoise | ||
13 | 14 | ||
14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "amadeus.settings") | 15 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "amadeus.settings") |
15 | 16 | ||
16 | application = get_wsgi_application() | 17 | application = get_wsgi_application() |
18 | +application = DjangoWhiteNoise(application) | ||
17 | \ No newline at end of file | 19 | \ No newline at end of file |
requirements.txt
@@ -5,12 +5,19 @@ Django==1.10 | @@ -5,12 +5,19 @@ Django==1.10 | ||
5 | django-autoslug==1.9.3 | 5 | django-autoslug==1.9.3 |
6 | django-bootstrap-breadcrumbs==0.8 | 6 | django-bootstrap-breadcrumbs==0.8 |
7 | django-discover-runner==1.0 | 7 | django-discover-runner==1.0 |
8 | +django-floppyforms==1.7.0 | ||
8 | django-role-permissions==1.2.1 | 9 | django-role-permissions==1.2.1 |
10 | +django-s3direct==0.4.2 | ||
9 | django-widget-tweaks==1.4.1 | 11 | django-widget-tweaks==1.4.1 |
10 | djangorestframework==3.4.6 | 12 | djangorestframework==3.4.6 |
13 | +itsdangerous==0.24 | ||
11 | Jinja2==2.8 | 14 | Jinja2==2.8 |
12 | MarkupSafe==0.23 | 15 | MarkupSafe==0.23 |
13 | Pillow==3.3.1 | 16 | Pillow==3.3.1 |
17 | +pkg-resources==0.0.0 | ||
18 | +psycopg2==2.6.2 | ||
14 | pycpfcnpj==1.0.2 | 19 | pycpfcnpj==1.0.2 |
15 | six==1.10.0 | 20 | six==1.10.0 |
16 | -psycopg2==2.6.2 | ||
17 | \ No newline at end of file | 21 | \ No newline at end of file |
22 | +slugify==0.0.1 | ||
23 | +Werkzeug==0.11.11 | ||
24 | +whitenoise==3.2.2 |