From 74cd23cb319db331158abdccd1a88cbe452e3de0 Mon Sep 17 00:00:00 2001 From: Niklas rust Date: Tue, 22 Oct 2019 13:56:35 +0200 Subject: [PATCH] whitenoise compression and caching --- config/settings/base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/settings/base.py b/config/settings/base.py index a04f99d..96fcd06 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -142,6 +142,8 @@ STATIC_ROOT = str(ROOT_DIR("staticfiles")) STATIC_URL = "/static/" # https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS STATICFILES_DIRS = [str(APPS_DIR.path("static"))] +STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' + # https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders STATICFILES_FINDERS = [ "django.contrib.staticfiles.finders.FileSystemFinder",