Skip to content

Commit

Permalink
Merge branch 'django-cms:master' into feat/improve_default_copy
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun authored Mar 6, 2025
2 parents aab0417 + 7a5e73a commit c24e4a5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
dist/
build/
.env
.venv
venv
local.sqlite
.coverage
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
Changelog
=========

2.2.1 (2025-03-06)
==================

* fix: Pre-populate `version.content` cache when getting version object by @fsbraun in https://github.com/django-cms/djangocms-versioning/pull/446
* fix: Test compatibility with django CMS 5 by @fsbraun in https://github.com/django-cms/djangocms-versioning/pull/453
* fix: For headless mode, django CMS 5.0 adds preview buttons to all views. Do not add again. by @fsbraun in https://github.com/django-cms/djangocms-versioning/pull/455
* ci: update ruff configuration by @earthcomfy in https://github.com/django-cms/djangocms-versioning/pull/448
* build(deps): bump actions/cache from 4.2.0 to 4.2.2 by @dependabot in https://github.com/django-cms/djangocms-versioning/pull/452


2.2.0 (2025-01-17)
==================

Expand Down
2 changes: 1 addition & 1 deletion djangocms_versioning/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.2.0"
__version__ = "2.2.1"
3 changes: 2 additions & 1 deletion djangocms_versioning/cms_toolbars.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

VERSIONING_MENU_IDENTIFIER = "version"
CMS_SUPPORTS_DELETING_TRANSLATIONS = version.Version(cms_version) > version.Version("4.1.4")
CMS_ADDS_PREVIEW_BUTTON = version.Version(cms_version) >= version.Version("4.2")


class VersioningToolbar(PlaceholderToolbar):
Expand Down Expand Up @@ -271,7 +272,7 @@ def _add_view_published_button(self):
def _add_preview_button(self):
"""Helper method to add a preview button to the toolbar when not in preview mode"""
# Check if object is registered with versioning otherwise don't add
if not self._is_versioned():
if not self._is_versioned() or CMS_ADDS_PREVIEW_BUTTON:
return

if not self.toolbar.preview_mode_active and not self.toolbar.edit_mode_active:
Expand Down

0 comments on commit c24e4a5

Please sign in to comment.