diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 67b2e76..f044fc6 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -8,10 +8,10 @@ jobs: strategy: fail-fast: false matrix: - tutor_version: ['<21.0.0', '<22.0.0', 'main'] + tutor_version: ['<22.0.0', '<21.0.0', 'main'] steps: - name: Run Integration Tests - uses: eduNEXT/integration-test-in-tutor@v0.1.3 + uses: eduNEXT/integration-test-in-tutor@v0.1.0 with: tutor_version: ${{ matrix.tutor_version }} app_name: 'eox-theming' diff --git a/CHANGELOG.md b/CHANGELOG.md index 29adcb4..db9d685 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [v9.3.1](https://github.com/eduNEXT/eox-theming/compare/v9.3.0...v9.3.1) - (2026-01-20) +## [v9.3.1](https://github.com/eduNEXT/eox-theming/compare/v9.3.0...v9.3.1) - (2026-01-18) ### Changed -- Update Tutor integration-tests GitHub Action version to avoid integration test failures. +- **Django 5.2 Compatibility**: Migrated static files storage configuration from the deprecated `STATICFILES_STORAGE` setting to the new `STORAGES` dictionary. ## [v9.3.0](https://github.com/eduNEXT/eox-theming/compare/v9.2.0...v9.3.0) - (2025-10-13) diff --git a/Makefile b/Makefile index 33516bc..60facdd 100644 --- a/Makefile +++ b/Makefile @@ -56,6 +56,6 @@ quality: clean ## check coding style with pycodestyle and pylint test-python: clean ## Run test suite. $(TOX) pip install -r requirements/test.txt --exists-action w $(TOX) coverage run --source="." -m pytest ./eox_theming --ignore-glob='**/integration/*' - $(TOX) coverage report -m --fail-under=74 + $(TOX) coverage report -m --fail-under=73 run-tests: test-python quality diff --git a/README.rst b/README.rst index e9878a2..6f62a13 100644 --- a/README.rst +++ b/README.rst @@ -48,7 +48,7 @@ Compatibility Notes +------------------+---------------+ | Teak | >= 9.0.0 | +------------------+---------------+ -| Ulmo | >= 9.3.0 | +| Ulmo | >= 9.3.1 | +------------------+---------------+ The plugin is configured for the latest release (Teak). If you need compatibility for previous releases, go to the README of the relevant version tag and if it is necessary you can change the configuration in ``eox_theming/settings/common.py``. diff --git a/eox_theming/settings/common.py b/eox_theming/settings/common.py index 6b5a698..28535c1 100644 --- a/eox_theming/settings/common.py +++ b/eox_theming/settings/common.py @@ -93,6 +93,15 @@ def plugin_settings(settings): settings.EOX_THEMING_CONFIGURATION_HELPER_BACKEND = 'eox_theming.edxapp_wrapper.backends.j_configuration_helpers' settings.EOX_THEMING_THEMING_HELPER_BACKEND = 'eox_theming.edxapp_wrapper.backends.j_theming_helpers' settings.EOX_THEMING_STORAGE_BACKEND = 'eox_theming.edxapp_wrapper.backends.l_storage' - settings.STATICFILES_STORAGE = 'eox_theming.theming.storage.EoxProductionStorage' + + if hasattr(settings, 'DEFAULT_FILE_STORAGE'): + settings.STATICFILES_STORAGE = ( + 'eox_theming.theming.storage.EoxProductionStorage' + ) + else: + settings.STORAGES = getattr(settings, 'STORAGES', {}) + settings.STORAGES.setdefault('staticfiles', {})['BACKEND'] = ( + 'eox_theming.theming.storage.EoxProductionStorage' + ) settings.EOX_THEMING_EDXMAKO_BACKEND = 'eox_theming.edxapp_wrapper.backends.l_mako' diff --git a/eox_theming/settings/devstack.py b/eox_theming/settings/devstack.py index e958aa6..11e3c07 100644 --- a/eox_theming/settings/devstack.py +++ b/eox_theming/settings/devstack.py @@ -14,4 +14,7 @@ def plugin_settings(settings): 'eox_theming.theming.finders.EoxThemeFilesFinder', ] + settings.STATICFILES_FINDERS - settings.STATICFILES_STORAGE = 'eox_theming.theming.storage.EoxDevelopmentStorage' + if not hasattr(settings, 'STORAGES'): + settings.STATICFILES_STORAGE = 'eox_theming.theming.storage.EoxProductionStorage' + else: + settings.STORAGES.setdefault('staticfiles', {})['BACKEND'] = 'eox_theming.theming.storage.EoxProductionStorage' diff --git a/eox_theming/settings/test.py b/eox_theming/settings/test.py index de99bc5..9c5c694 100644 --- a/eox_theming/settings/test.py +++ b/eox_theming/settings/test.py @@ -62,7 +62,12 @@ def plugin_settings(settings): # pylint: disable=function-redefined except AttributeError: pass - settings.STATICFILES_STORAGE = 'openedx.core.storage.ProductionStorage' + settings.STATICFILES_STORAGE = 'eox_theming.theming.storage.EoxProductionStorage' + + if not hasattr(settings, 'STORAGES'): + settings.STORAGES = {} + + settings.STORAGES.setdefault('staticfiles', {})['BACKEND'] = 'eox_theming.theming.storage.EoxProductionStorage' settings.STATICFILES_FINDERS = [ x for x in settings.STATICFILES_FINDERS if 'EoxThemeFilesFinder' not in x