Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
storage: Use Django 4.0 manifest_storage option.
Anders Kaseorgb17affc3dae8
diff --git a/zerver/lib/storage.py b/zerver/lib/storage.pyindex 67f3867a8c1..2fef2a09288 100644--- a/zerver/lib/storage.py+++ b/zerver/lib/storage.py@@ -6,6 +6,7 @@ from typing import Optionalfrom django.conf import settingsfrom django.contrib.staticfiles.storage import ManifestStaticFilesStorage+from django.core.files.storage import FileSystemStorageif settings.DEBUG:from django.contrib.staticfiles.finders import find@@ -56,9 +57,5 @@ class ZulipStorage(IgnoreBundlesManifestStaticFilesStorage):# so, we can use a different copy of staticfiles.json for each# deployment, which ensures that we always use the correct static# assets for each deployment.- manifest_name = os.path.join(settings.DEPLOY_ROOT, "staticfiles.json")-- def path(self, name: str) -> str:- if name == self.manifest_name:- return name- return super().path(name)+ def __init__(self) -> None:+ return super().__init__(manifest_storage=FileSystemStorage(location=settings.DEPLOY_ROOT))