diff --git a/CHANGELOG.md b/CHANGELOG.md index bf57caf..5c02ede 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,17 @@ Changelog Unreleased ---------- +2.3.0 (2026-04-16) +------------------ +* Add Wagtail 7.0, 7.1, 7.2, and 7.3 support. +* Update dependencies: + - wagtail>=5.2,<8.0 (was >=5.2,<7.0) + - django-el-pagination>=4.0.0,<5.0 (was ==4.0.0) + - django-taggit>=5.0,<7.0 (was >=5.0,<6.2) + - wagtail-markdown>=0.11.1,<0.14.0 (was ==0.11.1) +* Remove Draftail rich text hooks (features now built-in to Wagtail) +* Add Python 3.12 support +* Add Wagtail 7 framework classifier 2.2.0 (2025-04-07) ------------------ diff --git a/puput/__init__.py b/puput/__init__.py index 000399f..eb5189c 100644 --- a/puput/__init__.py +++ b/puput/__init__.py @@ -1,6 +1,6 @@ __author__ = "Marc Tudurí" __email__ = "marctc@gmail.com" -__version__ = "2.2.0" +__version__ = "2.3.0" PUPUT_APPS = ( # Wagtail apps diff --git a/puput/wagtail_hooks.py b/puput/wagtail_hooks.py deleted file mode 100644 index 4dbdde1..0000000 --- a/puput/wagtail_hooks.py +++ /dev/null @@ -1,56 +0,0 @@ -import wagtail.admin.rich_text.editors.draftail.features as draftail_features -from wagtail.admin.rich_text.converters.html_to_contentstate import InlineStyleElementHandler, BlockElementHandler -from wagtail import hooks - - -@hooks.register("register_rich_text_features") -def register_blockquote_feature(features): - """ - Registering the `blockquote` feature, which uses the `blockquote` Draft.js block type, - and is stored as HTML with a `
` tag. - """ - feature_name = "blockquote" - type_ = "blockquote" - tag = "blockquote" - - control = { - "type": type_, - "label": "❝", - "description": "Quote", - "element": "blockquote", - } - - features.register_editor_plugin("draftail", feature_name, draftail_features.BlockFeature(control)) - - features.register_converter_rule( - "contentstate", - feature_name, - { - "from_database_format": {tag: BlockElementHandler(type_)}, - "to_database_format": {"block_map": {type_: tag}}, - }, - ) - features.default_features.append(feature_name) - - -@hooks.register("register_rich_text_features") -def register_codeline_feature(features): - feature_name = "Code Line" - type_ = "CODE" - tag = "code" - - control = { - "type": type_, - "label": ">_", - "description": "Code Line", - } - - features.register_editor_plugin("draftail", feature_name, draftail_features.InlineStyleFeature(control)) - - db_conversion = { - "from_database_format": {tag: InlineStyleElementHandler(type_)}, - "to_database_format": {"style_map": {type_: tag}}, - } - - features.register_converter_rule("contentstate", feature_name, db_conversion) - features.default_features.append(feature_name) diff --git a/setup.py b/setup.py index c9633d6..c80f563 100644 --- a/setup.py +++ b/setup.py @@ -25,10 +25,10 @@ def get_metadata(package, field): description='A Django blog app implemented in Wagtail.', long_description=codecs.open(os.path.join(os.path.dirname(__file__), 'README.rst'), encoding='utf-8').read(), install_requires=[ - 'wagtail>=5.2,<7.0', - 'django-el-pagination==4.0.0', - 'django-taggit>=5.0,<6.2', - 'wagtail-markdown==0.11.1' + 'wagtail>=5.2,<8.0', + 'django-el-pagination>=4.0.0,<5.0', + 'django-taggit>=5.0,<7.0', + 'wagtail-markdown>=0.11.1,<0.14.0' ], url='http://github.com/APSL/puput', author=get_metadata('puput', 'author'), @@ -42,6 +42,7 @@ def get_metadata(package, field): 'Framework :: Wagtail', 'Framework :: Wagtail :: 5', 'Framework :: Wagtail :: 6', + 'Framework :: Wagtail :: 7', 'Intended Audience :: Developers', 'Programming Language :: Python', 'Programming Language :: Python :: 3',