mirror of https://github.com/django/django.git
Fixed #30802 -- Prevented manifest creation when running collectstatic in dry run mode.
This commit is contained in:
parent
45554fd5c5
commit
fa8fe09e4e
|
@ -398,6 +398,7 @@ class ManifestFilesMixin(HashedFilesMixin):
|
|||
def post_process(self, *args, **kwargs):
|
||||
self.hashed_files = {}
|
||||
yield from super().post_process(*args, **kwargs)
|
||||
if not kwargs.get('dry_run'):
|
||||
self.save_manifest()
|
||||
|
||||
def save_manifest(self):
|
||||
|
|
|
@ -334,6 +334,11 @@ class TestCollectionDryRun(TestNoFilesCreated, CollectionTestCase):
|
|||
super().run_collectstatic(dry_run=True)
|
||||
|
||||
|
||||
@override_settings(STATICFILES_STORAGE='django.contrib.staticfiles.storage.ManifestStaticFilesStorage')
|
||||
class TestCollectionDryRunManifestStaticFilesStorage(TestCollectionDryRun):
|
||||
pass
|
||||
|
||||
|
||||
class TestCollectionFilesOverride(CollectionTestCase):
|
||||
"""
|
||||
Test overriding duplicated files by ``collectstatic`` management command.
|
||||
|
|
Loading…
Reference in New Issue