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