Skip to content

feat: upgrade to Wagtail 7.x support#304

Closed
hoheinzollern wants to merge 0 commit intoAPSL:masterfrom
hoheinzollern:master
Closed

feat: upgrade to Wagtail 7.x support#304
hoheinzollern wants to merge 0 commit intoAPSL:masterfrom
hoheinzollern:master

Conversation

@hoheinzollern
Copy link
Copy Markdown

@hoheinzollern hoheinzollern commented Mar 14, 2026

Hey, I have a Puput/Wagtail installation that I needed to update, and took the chance to update Puput's dependencies to the latest versions and check that it works. The interesting bit is that the wagtail_hooks are no longer needed since Wagtail 5.

  • Update Wagtail dependency to support versions 5.2 through 7.x
  • Update django-el-pagination, django-taggit, and wagtail-markdown dependencies
  • Remove deprecated wagtail_hooks.py (Draftail customizations)
  • Add Python 3.12 and Wagtail 7 framework classifiers
  • Bump version to 2.3.0

Rationale for wagtail_hooks.py removal:
The Draftail rich text editor was replaced in Wagtail 5.0+. The blockquote and code features previously added via hooks are now built-in to Wagtail and can be enabled via WAGTAILADMIN_RICH_TEXT_EDITORS configuration.

See Wagtail documentation:

Users can enable these features in settings.py:

WAGTAILADMIN_RICH_TEXT_EDITORS = {
    'default': {
        'OPTIONS': {
            'features': ['blockquote', 'code', ...]
        }
    }
}

This change maintains all functionality while aligning with modern Wagtail best practices and removing deprecated code.

@therefromhere
Copy link
Copy Markdown

therefromhere commented Apr 12, 2026

Nice one! I've tested that vs Wagtail 7.3 and it's working fine.

Only note vs your settings above is I think "WIDGET" is a required param now, this works for me:

WAGTAILADMIN_RICH_TEXT_EDITORS = {
    "default": {
        "WIDGET": "wagtail.admin.rich_text.DraftailRichTextArea",
        "OPTIONS": {
            "features": [
                "h2",
                "h3",
                "h4",
                "bold",
                "italic",
                "ol",
                "ul",
                "hr",
                "link",
                "document-link",
                "image",
                "embed",
                "blockquote",
                "code",
            ]
        },
    }
}

It'd be great to get this merged since Wagtail 6.3 LTS will be out of support soon (https://github.com/wagtail/wagtail/wiki/Release-schedule ).

Also ref

@hoheinzollern
Copy link
Copy Markdown
Author

Great to hear! I've also taken care of updating the dependent wagtail-markdown package, as I was getting a warning about the outdated dependencies:

Ideally, if doing a release, it would be helpful to have that merged first and update the dependencies.

@hoheinzollern
Copy link
Copy Markdown
Author

@therefromhere I tried to clean up the changelog with a force push, somehow it got closed. Feel free to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants