Remove ThemingAware storage mixins and ComprehensiveThemeFinder.

Collectstatic failed in production when comprehensive theme contained custom css files.
This patch fixes that problem by removing ComprehensiveThemeFinder from STATICFILES_FINDERS
and ComprehensiveThemingAware mixin from STATICFILES_STORAGE.

Comprehensive theme static dirs are added to the top of the STATICFILES_DIRS entry,
which means that the default django FilesystemFinder will find theme static files,
and since the theme folder is at the top of STATICFILES_DIRS, theme files will take
precedence over default LMS/CMS static files.

This change means that theme static file URLs are no longer prefixed with themes/<theme-name>/,
but since we currently only support one comprehensive theme at a time, that shouldn't be a problem.
If/when we want to make the choice of a theme dynamic per-request (microsites?), we will have to
bring custom theme finders and storage mixins back, but for now, we don't need them.
This commit is contained in:
Matjaz Gregoric
2016-01-14 09:00:17 +01:00
parent 8c26178df3
commit 266f593d2d
5 changed files with 0 additions and 7 deletions

View File

@@ -4,11 +4,9 @@ Django storage backends for Open edX.
from django.contrib.staticfiles.storage import StaticFilesStorage, CachedFilesMixin
from pipeline.storage import PipelineMixin, NonPackagingMixin
from require.storage import OptimizedFilesMixin
from openedx.core.djangoapps.theming.storage import ComprehensiveThemingAwareMixin
class ProductionStorage(
ComprehensiveThemingAwareMixin,
OptimizedFilesMixin,
PipelineMixin,
CachedFilesMixin,
@@ -22,7 +20,6 @@ class ProductionStorage(
class DevelopmentStorage(
ComprehensiveThemingAwareMixin,
NonPackagingMixin,
PipelineMixin,
StaticFilesStorage