Merge pull request #29403 from mitodl/arslan/fix-pipeline-import
fix: Inconsistent PipelineCachedStorage usages
This commit is contained in:
@@ -33,7 +33,7 @@ DEBUG = True
|
||||
REQUIRE_DEBUG = False
|
||||
|
||||
# Fetch static files out of the pipeline's static root
|
||||
STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
|
||||
STATICFILES_STORAGE = 'pipeline.storage.PipelineManifestStorage'
|
||||
|
||||
# Serve static files at /static directly from the staticfiles directory under test root.
|
||||
# Note: optimized files for testing are generated with settings from test_static_optimized
|
||||
|
||||
@@ -14,6 +14,7 @@ from the same directory.
|
||||
|
||||
|
||||
from openedx.core.lib.derived import derive_settings
|
||||
from openedx.core.lib.django_require.staticstorage import OptimizedCachedRequireJsStorage
|
||||
|
||||
from .common import * # pylint: disable=wildcard-import, unused-wildcard-import
|
||||
|
||||
@@ -30,7 +31,7 @@ DATABASES = {
|
||||
######################### PIPELINE ####################################
|
||||
|
||||
# Use RequireJS optimized storage
|
||||
STATICFILES_STORAGE = 'openedx.core.lib.django_require.staticstorage.OptimizedCachedRequireJsStorage'
|
||||
STATICFILES_STORAGE = f"{OptimizedCachedRequireJsStorage.__module__}.{OptimizedCachedRequireJsStorage.__name__}"
|
||||
|
||||
# Revert to the default set of finders as we don't want to dynamically pick up files from the pipeline
|
||||
STATICFILES_FINDERS = [
|
||||
|
||||
@@ -34,7 +34,7 @@ DEBUG = True
|
||||
REQUIRE_DEBUG = False
|
||||
|
||||
# Fetch static files out of the pipeline's static root
|
||||
STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
|
||||
STATICFILES_STORAGE = 'pipeline.storage.PipelineManifestStorage'
|
||||
|
||||
# Serve static files at /static directly from the staticfiles directory under test root.
|
||||
# Note: optimized files for testing are generated with settings from test_static_optimized
|
||||
|
||||
@@ -14,6 +14,7 @@ from the same directory.
|
||||
|
||||
|
||||
from openedx.core.lib.derived import derive_settings
|
||||
from openedx.core.lib.django_require.staticstorage import OptimizedCachedRequireJsStorage
|
||||
|
||||
from .common import * # pylint: disable=wildcard-import, unused-wildcard-import
|
||||
|
||||
@@ -47,7 +48,7 @@ PROCTORING_BACKENDS = {
|
||||
######################### PIPELINE ####################################
|
||||
|
||||
# Use RequireJS optimized storage
|
||||
STATICFILES_STORAGE = 'openedx.core.lib.django_require.staticstorage.OptimizedCachedRequireJsStorage'
|
||||
STATICFILES_STORAGE = f"{OptimizedCachedRequireJsStorage.__module__}.{OptimizedCachedRequireJsStorage.__name__}"
|
||||
|
||||
# Revert to the default set of finders as we don't want to dynamically pick up files from the pipeline
|
||||
STATICFILES_FINDERS = [
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
:class:`~django_require.staticstorage.OptimizedCachedRequireJsStorage`
|
||||
"""
|
||||
|
||||
from pipeline.storage import PipelineCachedStorage
|
||||
from pipeline.storage import PipelineManifestStorage
|
||||
from require.storage import OptimizedFilesMixin
|
||||
|
||||
from openedx.core.storage import PipelineForgivingMixin
|
||||
|
||||
|
||||
class OptimizedCachedRequireJsStorage(OptimizedFilesMixin, PipelineForgivingMixin, PipelineCachedStorage):
|
||||
class OptimizedCachedRequireJsStorage(OptimizedFilesMixin, PipelineForgivingMixin, PipelineManifestStorage):
|
||||
"""
|
||||
Custom storage backend that is used by Django-require.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user