2. Update COMPREHNSIVE_THEME_DIR to COMPREHENSIVE_THEME_DIRS 3. Update paver commands to support multi theme dirs 4. Updating template loaders 5. Add ENABLE_COMPREHENSIVE_THEMING flag to enable or disable theming via settings 6. Update tests 7. Add backward compatibility for COMPREHEHNSIVE_THEME_DIR
42 lines
1.1 KiB
Python
42 lines
1.1 KiB
Python
"""
|
|
Django storage backends for Open edX.
|
|
"""
|
|
from django_pipeline_forgiving.storages import PipelineForgivingStorage
|
|
from django.contrib.staticfiles.storage import StaticFilesStorage
|
|
from pipeline.storage import NonPackagingMixin
|
|
from require.storage import OptimizedFilesMixin
|
|
from openedx.core.djangoapps.theming.storage import (
|
|
ThemeStorage,
|
|
ThemeCachedFilesMixin,
|
|
ThemePipelineMixin
|
|
)
|
|
|
|
|
|
class ProductionStorage(
|
|
PipelineForgivingStorage,
|
|
OptimizedFilesMixin,
|
|
ThemePipelineMixin,
|
|
ThemeCachedFilesMixin,
|
|
ThemeStorage,
|
|
StaticFilesStorage
|
|
):
|
|
"""
|
|
This class combines Django's StaticFilesStorage class with several mixins
|
|
that provide additional functionality. We use this version on production.
|
|
"""
|
|
pass
|
|
|
|
|
|
class DevelopmentStorage(
|
|
NonPackagingMixin,
|
|
ThemePipelineMixin,
|
|
ThemeStorage,
|
|
StaticFilesStorage
|
|
):
|
|
"""
|
|
This class combines Django's StaticFilesStorage class with several mixins
|
|
that provide additional functionality. We use this version for development,
|
|
so that we can skip packaging and optimization.
|
|
"""
|
|
pass
|