diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..68e9a87e --- /dev/null +++ b/.coveragerc @@ -0,0 +1,18 @@ +[run] +branch = True +source = djangocms_snippet +omit = + migrations/* + tests/* + +[report] +exclude_lines = + pragma: no cover + def __repr__ + if self.debug: + if settings.DEBUG + raise AssertionError + raise NotImplementedError + if 0: + if __name__ == .__main__.: +ignore_errors = True diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e7bf9f33..c45fdeec 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,13 +5,10 @@ Changelog Unreleased ========== +* feat: Added universal support for django CMS 3 and 4 * Drop support for Django < 3.2 * Drop support for Python < 3.9 -3.1.1 -===== - -* fix: Removed tight django-treebeard restriction added when 4.5.0 contained breaking changes. The core CMS and django-treebeard have since been patched to resolve the issue. 4.1.0 (2024-05-16) ================== @@ -69,6 +66,11 @@ Unreleased * feat: djangocms-versioning support added, including model restructure and configuration * feat: django-cms v4.0.x support added +3.1.1 +===== + +* fix: Removed tight django-treebeard restriction added when 4.5.0 contained breaking changes. The core CMS and django-treebeard have since been patched to resolve the issue. + 3.1.0 2022-09-01 ================ diff --git a/README.rst b/README.rst index a44a0f2f..2bad742f 100644 --- a/README.rst +++ b/README.rst @@ -2,7 +2,7 @@ django CMS Snippet ================== -|pypi| |coverage| |python| |django| |djangocms| +|pypi| |coverage| |python| |django| |djangocms| |django-cms4| **django CMS Snippet** provides a plugin for `django CMS `_ @@ -131,9 +131,11 @@ You can run tests by executing:: :target: http://badge.fury.io/py/djangocms-snippet .. |coverage| image:: https://codecov.io/gh/django-cms/djangocms-snippet/branch/master/graph/badge.svg :target: https://codecov.io/gh/django-cms/djangocms-snippet -.. |python| image:: https://img.shields.io/badge/python-3.5+-blue.svg +.. |python| image:: https://img.shields.io/badge/python-3.9+-blue.svg :target: https://pypi.org/project/djangocms-snippet/ -.. |django| image:: https://img.shields.io/badge/django-2.2,%203.0,%203.1-blue.svg +.. |django| image:: https://img.shields.io/badge/django-3.2+-blue.svg :target: https://www.djangoproject.com/ .. |djangocms| image:: https://img.shields.io/badge/django%20CMS-3.7%2B-blue.svg :target: https://www.django-cms.org/ +.. |djangocms4| image:: https://img.shields.io/badge/django%20CMS-4-blue.svg + :target: https://www.django-cms.org/ diff --git a/src/djangocms_snippet/admin.py b/src/djangocms_snippet/admin.py index 9ade47ec..06d06d0a 100644 --- a/src/djangocms_snippet/admin.py +++ b/src/djangocms_snippet/admin.py @@ -21,10 +21,13 @@ djangocms_versioning_enabled = getattr(settings, "DJANGOCMS_SNIPPET_VERSIONING_ENABLED", True) try: - from djangocms_versioning.admin import ExtendedVersionAdminMixin + try: + from djangocms_versioning.admin import ExtendedIndicatorVersionAdminMixin + except ImportError: + from djangocms_versioning.admin import ExtendedVersionAdminMixin as ExtendedIndicatorVersionAdminMixin if djangocms_versioning_enabled: - snippet_admin_classes.insert(0, ExtendedVersionAdminMixin) + snippet_admin_classes.insert(0, ExtendedIndicatorVersionAdminMixin) except ImportError: djangocms_versioning_enabled = False @@ -40,7 +43,6 @@ class Media: list_display = ('name',) search_fields: ClassVar[list[str]] = ['name'] - change_form_template = 'djangocms_snippet/admin/change_form.html' text_area_attrs: ClassVar[dict] = { 'rows': 20, 'data-editor': True,