Skip to content

Commit

Permalink
Merge pull request #175 from girder/staticfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
brianhelba authored Mar 20, 2022
2 parents 618f36d + 217018e commit 494dad2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 0 additions & 5 deletions composed_configuration/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,6 @@ class TestingBaseConfiguration(MinioStorageMixin, _BaseConfiguration):

MINIO_STORAGE_MEDIA_BUCKET_NAME = 'test-django-storage'

# To generate static file URLs in testing (where DEBUG is False),
# CompressedManifestStaticFilesStorage requires collectstatic to be run,
# so use an alternative which does not require that
STATICFILES_STORAGE = 'whitenoise.storage.CompressedStaticFilesStorage'

# Testing will set EMAIL_BACKEND to use the memory backend


Expand Down
4 changes: 3 additions & 1 deletion composed_configuration/_static.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,6 @@ def mutate_configuration(configuration: Type[ComposedConfiguration]) -> None:
security_index + 1, 'whitenoise.middleware.WhiteNoiseMiddleware'
)

STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
# CompressedManifestStaticFilesStorage does not work properly with drf-
# https://github.com/axnsan12/drf-yasg/issues/761
STATICFILES_STORAGE = 'whitenoise.storage.CompressedStaticFilesStorage'

0 comments on commit 494dad2

Please sign in to comment.