From dd54653530b304b08d77732caf7ce6e3e5a0ccae Mon Sep 17 00:00:00 2001 From: Josh Peng Yu Date: Wed, 7 Feb 2024 23:22:23 +0800 Subject: [PATCH] fix: URL of show references in action list of djangocms-versioning-filer list page (#48) * fix: URL of `show references` in action list of djangocms-versioning-filer list page * fix: update circleci/config.yml * fix: update dj22_cms40.txt * fix: update `requirements_base.txt` * fix: update `requirements_base.txt` * fix: Added CMS_CONFIRM_VERSION4 in test_settings to show intent of using v4 * fix: fix `test_list_display` test * fix: remove extra blank lines --------- Co-authored-by: Josh Yu --- .circleci/config.yml | 6 +++--- CHANGELOG.rst | 3 +++ .../admin/action_buttons/show_references.html | 2 +- tests/requirements/dj22_cms40.txt | 2 +- tests/requirements/requirements_base.txt | 6 +++--- tests/settings.py | 1 + tests/test_admin.py | 3 +++ 7 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1db8643..85a204f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ py37default: &py37default - attach_workspace: at: /tmp/images - run: docker load -i /tmp/images/py37.tar || true - - run: docker run py37 tox -e $CIRCLE_STAGE + - run: docker run py37 tox -e $CIRCLE_JOB py38default: &py38default docker: @@ -22,7 +22,7 @@ py38default: &py38default - attach_workspace: at: /tmp/images - run: docker load -i /tmp/images/py38.tar || true - - run: docker run py38 tox -e $CIRCLE_STAGE + - run: docker run py38 tox -e $CIRCLE_JOB py39default: &py39default docker: @@ -34,7 +34,7 @@ py39default: &py39default - attach_workspace: at: /tmp/images - run: docker load -i /tmp/images/py39.tar || true - - run: docker run py39 tox -e $CIRCLE_STAGE + - run: docker run py39 tox -e $CIRCLE_JOB py37_requires: &py37_requires diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a6eebda..86dadba 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,9 @@ Changelog Unreleased ========== +* fix: URL of `show references` in action list of djangocms-versioning-filer list page +* fix: Added CMS_CONFIRM_VERSION4 in test_settings to show intent of using v4 +* fix: fix circleci build errors 1.4.2 (2022-05-23) ================== diff --git a/djangocms_references/templates/djangocms_versioning_filer/admin/action_buttons/show_references.html b/djangocms_references/templates/djangocms_versioning_filer/admin/action_buttons/show_references.html index 987de85..38a1d60 100644 --- a/djangocms_references/templates/djangocms_versioning_filer/admin/action_buttons/show_references.html +++ b/djangocms_references/templates/djangocms_versioning_filer/admin/action_buttons/show_references.html @@ -2,4 +2,4 @@ {% get_versioning_filer_references_url file as references_url %} \ No newline at end of file + title="{% blocktrans %}Show references{% endblocktrans %}" class="action-button cms-form-get-method"> \ No newline at end of file diff --git a/tests/requirements/dj22_cms40.txt b/tests/requirements/dj22_cms40.txt index 48c5b60..cc6832d 100644 --- a/tests/requirements/dj22_cms40.txt +++ b/tests/requirements/dj22_cms40.txt @@ -1,3 +1,3 @@ -r ./requirements_base.txt -Django>=2.2,<3.0 +Django>=2.2,<4.0 diff --git a/tests/requirements/requirements_base.txt b/tests/requirements/requirements_base.txt index 434cd17..80d4a7a 100644 --- a/tests/requirements/requirements_base.txt +++ b/tests/requirements/requirements_base.txt @@ -6,6 +6,6 @@ isort tox # Unreleased django-cms 4.0 compatible packages -https://github.com/django-cms/django-cms/tarball/develop-4#egg=django-cms -https://github.com/django-cms/djangocms-versioning/tarball/master#egg=djangocms-versioning -https://github.com/django-cms/djangocms-alias/tarball/master#egg=djangocms-alias +https://github.com/django-cms/django-cms/tarball/4.0.0#egg=django-cms +https://github.com/django-cms/djangocms-versioning/tarball/1.2.2#egg=djangocms-versioning +https://github.com/django-cms/djangocms-alias/tarball/1.11.0#egg=djangocms-alias diff --git a/tests/settings.py b/tests/settings.py index c2216e2..60b50a3 100644 --- a/tests/settings.py +++ b/tests/settings.py @@ -8,6 +8,7 @@ "djangocms_references.test_utils.polls", "djangocms_references.test_utils.nested_references_app", ], + "CMS_CONFIRM_VERSION4": True, "MIGRATION_MODULES": { "auth": None, "cms": None, diff --git a/tests/test_admin.py b/tests/test_admin.py index 9e1ecf9..6fb48c5 100644 --- a/tests/test_admin.py +++ b/tests/test_admin.py @@ -6,6 +6,7 @@ from djangocms_alias.admin import AliasContentAdmin from djangocms_alias.models import Alias, AliasContent, Category +from djangocms_versioning.models import Version class AliasAdminReferencesMonkeyPatchTestCase(CMSTestCase): @@ -22,6 +23,8 @@ def test_list_display(self): name="Alias Reference Monkey Patch Content", language="en", ) + + Version.objects.create(content=alias_content, created_by=request.user) content_type = ContentType.objects.get(app_label=alias._meta.app_label, model=alias._meta.model_name) alias_admin = AliasContentAdmin(AliasContent, admin.AdminSite()) func = alias_admin.get_list_display(request)[-1]