Skip to content

Commit 502c0d1

Browse files
committed
updated heroku settings
1 parent 7b9defa commit 502c0d1

File tree

2 files changed

+58
-90
lines changed

2 files changed

+58
-90
lines changed

.idea/workspace.xml

Lines changed: 46 additions & 89 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

KeystrokesAuthentication/settings.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"""
1212

1313
import os
14+
import django_heroku
1415

1516
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
1617
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@@ -51,6 +52,7 @@
5152
'django.contrib.auth.middleware.AuthenticationMiddleware',
5253
'django.contrib.messages.middleware.MessageMiddleware',
5354
'django.middleware.clickjacking.XFrameOptionsMiddleware',
55+
'whitenoise.middleware.WhiteNoiseMiddleware',
5456
]
5557

5658
ROOT_URLCONF = 'KeystrokesAuthentication.urls'
@@ -120,5 +122,14 @@
120122

121123
# Static files (CSS, JavaScript, Images)
122124
# https://docs.djangoproject.com/en/3.0/howto/static-files/
123-
125+
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
126+
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
124127
STATIC_URL = '/static/'
128+
129+
# Extra places for collectstatic to find static files.
130+
STATICFILES_DIRS = (
131+
os.path.join(BASE_DIR, 'static'),
132+
)
133+
134+
# Activate Django-Heroku.
135+
django_heroku.settings(locals())

0 commit comments

Comments
 (0)