-
-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
patches: Backport compressor content based compression
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
patches/0001-settings-Use-content-hashing-for-django-compressor.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
From 90fbea8a41019ccd992f44f87c8268d42494823a Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= <[email protected]> | ||
Date: Thu, 29 Jun 2023 19:58:03 +0200 | ||
Subject: [PATCH 1/1] settings: Use content hashing for django-compressor | ||
|
||
This makes it safe to deploy on multiple servers. | ||
|
||
See https://github.com/WeblateOrg/helm/issues/54 | ||
--- | ||
weblate/settings_docker.py | 1 + | ||
weblate/settings_example.py | 1 + | ||
2 files changed, 2 insertions(+) | ||
|
||
diff --git weblate/settings_docker.py weblate/settings_docker.py | ||
index 07c379ad4c..e7856b5c69 100644 | ||
--- weblate/settings_docker.py | ||
+++ weblate/settings_docker.py | ||
@@ -1229,6 +1229,7 @@ FONTS_CDN_URL = None | ||
# Django compressor offline mode | ||
COMPRESS_OFFLINE = True | ||
COMPRESS_OFFLINE_CONTEXT = "weblate.utils.compress.offline_context" | ||
+COMPRESS_CSS_HASHING_METHOD = "content" | ||
|
||
# Require login for all URLs | ||
if REQUIRE_LOGIN: | ||
diff --git weblate/settings_example.py weblate/settings_example.py | ||
index 55127b0c30..ddda288a50 100644 | ||
--- weblate/settings_example.py | ||
+++ weblate/settings_example.py | ||
@@ -873,6 +873,7 @@ FONTS_CDN_URL = None | ||
# Django compressor offline mode | ||
COMPRESS_OFFLINE = False | ||
COMPRESS_OFFLINE_CONTEXT = "weblate.utils.compress.offline_context" | ||
+COMPRESS_CSS_HASHING_METHOD = "content" | ||
|
||
# Require login for all URLs | ||
if REQUIRE_LOGIN: | ||
-- | ||
2.32.0 | ||
|