File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4646
4747MIDDLEWARE = [
4848 'django.middleware.security.SecurityMiddleware' ,
49+ 'whitenoise.middleware.WhiteNoiseMiddleware' ,
4950 'django.contrib.sessions.middleware.SessionMiddleware' ,
5051 'django.middleware.common.CommonMiddleware' ,
5152 'django.middleware.csrf.CsrfViewMiddleware' ,
143144STATIC_URL = '/static/'
144145
145146
146- # Simplified static file serving.
147- # https ://warehouse.python.org/project/whitenoise/
148- STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage '
147+ # Static file serving.
148+ # http ://whitenoise.evans.io/en/stable/django.html#django-middleware
149+ STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage '
Original file line number Diff line number Diff line change 1313os .environ .setdefault ('DJANGO_SETTINGS_MODULE' , 'locallibrary.settings' )
1414
1515application = get_wsgi_application ()
16-
17-
18- # Add static serving using whitenoise
19- from django .core .wsgi import get_wsgi_application
20- from whitenoise .django import DjangoWhiteNoise
21-
22- application = get_wsgi_application ()
23- application = DjangoWhiteNoise (application )
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ Django==2.0.2
33gunicorn == 19.7.1
44psycopg2-binary == 2.7.6
55wheel == 0.30.0
6- whitenoise == 3.3 .1
6+ whitenoise == 4 .1
You can’t perform that action at this time.
0 commit comments