Skip to content

Commit b754e2e

Browse files
[fix] Switched to django-minify-compress-staticfiles #565
Replaced the unmaintained django-compress-staticfiles with the new django-minify-compress-staticfiles package for static file minification and compression. Closes #565 --------- Co-authored-by: Federico Capoano <federico.capoano@gmail.com>
1 parent 8a56903 commit b754e2e

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

docs/developer/other-utilities.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ Storage Utilities
9191
``openwisp_utils.storage.CompressStaticFilesStorage``
9292
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9393

94-
A static storage backend for compression inheriting from
95-
`django-compress-staticfiles's
96-
<https://pypi.org/project/django-compress-staticfiles/>`_
97-
``CompressStaticFilesStorage`` class.
94+
A static storage backend for minification and compression inheriting from
95+
`django-minify-compress-staticfiles's
96+
<https://github.com/openwisp/django-minify-compress-staticfiles>`_
97+
``MinicompressStorage`` class.
9898

9999
Adds support for excluding file types using
100100
:ref:`OPENWISP_STATICFILES_VERSIONED_EXCLUDE

openwisp_utils/storage.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import fnmatch
22

3-
from compress_staticfiles.storage import (
4-
CompressStaticFilesStorage as BaseCompressStaticFilesStorage,
5-
)
63
from django.conf import settings
4+
from django_minify_compress_staticfiles.storage import (
5+
MinicompressStorage as BaseMinicompressStorage,
6+
)
77

88

99
class FileHashedNameMixin:
@@ -22,8 +22,8 @@ def hashed_name(self, name, content=None, filename=None):
2222

2323
class CompressStaticFilesStorage(
2424
FileHashedNameMixin,
25-
BaseCompressStaticFilesStorage,
25+
BaseMinicompressStorage,
2626
):
27-
"""Like CompressStaticFilesStorage, but allows excluding some files."""
27+
"""Like MinicompressStorage, but allows excluding some files."""
2828

2929
pass

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
zip_safe=False,
2727
install_requires=[
2828
"django-model-utils>=4.5,<5.1",
29-
"django-compress-staticfiles~=1.0.1b",
29+
"django-minify-compress-staticfiles~=1.1.0",
3030
"django-admin-autocomplete-filter~=0.7.1",
3131
"swapper~=1.4.0",
3232
# allow wider range here to avoid interfering with other modules
@@ -45,7 +45,7 @@
4545
"rest": [
4646
"djangorestframework~=3.16.0",
4747
"django-filter>=25.1,<26.0", # django-filter uses CalVer
48-
"drf-yasg==1.21.11", # pinning due to https://github.com/openwisp/openwisp-utils/issues/565
48+
"drf-yasg>=1.21.14,<1.22.0",
4949
],
5050
"channels": [
5151
"channels[daphne]~=4.3.0",

0 commit comments

Comments
 (0)