Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Add django compressor's COMPRESS_OFFLINE option for offline compression

Roland Geiderb04e7b34cdc1
diff --git a/settings/main.py b/settings/main.py
index b7b647530..9db0935d9 100644
--- a/settings/main.py
+++ b/settings/main.py
@@ -164,9 +164,14 @@ if os.environ.get("DJANGO_CACHE_BACKEND"):
if CONNECTION_POOL_KWARGS:
CACHES["default"]["OPTIONS"]["CONNECTION_POOL_KWARGS"] = CONNECTION_POOL_KWARGS
-# Folder for compressed CSS and JS files
+#
+# Django Compressor
+# Consult https://django-compressor.readthedocs.io/en/stable/ for more information
+# (specially the offline compression part)
+#
COMPRESS_ROOT = STATIC_ROOT
COMPRESS_ENABLED = env.bool('COMPRESS_ENABLED', not DEBUG)
+COMPRESS_OFFLINE = env.bool('COMPRESS_OFFLINE', False)
# The site's domain as used by the email verification workflow
EMAIL_PAGE_DOMAIN = SITE_URL