mirror of
https://github.com/status-im/cabot.git
synced 2025-02-23 18:08:06 +00:00
Merge pull request #431 from arachnys/whitenoise
Add whitenoise for serving static files
This commit is contained in:
commit
764a93e4ca
5
CHANGES
5
CHANGES
@ -1,3 +1,8 @@
|
||||
master
|
||||
------
|
||||
|
||||
* Use whitenoise to serve static files
|
||||
|
||||
Version 0.8.3
|
||||
-------------
|
||||
|
||||
|
@ -81,6 +81,9 @@ COMPRESS_URL = STATIC_URL
|
||||
# Additional locations of static files
|
||||
STATICFILES_DIRS = [os.path.join(PROJECT_ROOT, 'static')]
|
||||
|
||||
if not DEBUG:
|
||||
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
|
||||
|
||||
# List of finder classes that know how to find static files in
|
||||
# various locations.
|
||||
STATICFILES_FINDERS = (
|
||||
@ -111,6 +114,7 @@ TEMPLATES = [{
|
||||
}]
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
'whitenoise.middleware.WhiteNoiseMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
@ -120,7 +124,6 @@ MIDDLEWARE_CLASSES = (
|
||||
)
|
||||
|
||||
ROOT_URLCONF = 'cabot.urls'
|
||||
|
||||
INSTALLED_APPS = (
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
|
@ -29,3 +29,4 @@ twilio==3.4.1
|
||||
wsgiref==0.1.2
|
||||
python-dateutil==2.1
|
||||
django-auth-ldap==1.2.6
|
||||
whitenoise==3.3.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user