Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support/wagtail 62 #3

Closed
wants to merge 21 commits into from
Closed

Support/wagtail 62 #3

wants to merge 21 commits into from

Conversation

nickmoreton
Copy link
Collaborator

No description provided.

katdom13 and others added 21 commits May 16, 2024 19:38
* Update test matrix, docs
* Wagtail 6.0 upgrade consideration: Deprecated WidgetWithScript base widget class
* Update implementation of ReadonlyUUIDInput
* Drop support for Wagtail < 5.2

---------

Co-authored-by: Katherine Domingo <[email protected]>
* Make footnote model translatable
* Make package strings translatable
* Add Romanian translation
* Add i18n notes in README

---------

Co-authored-by: Jhonatan Lopes <[email protected]>
* Allow custom footnote reference rendering

This change does two things to permit custom rendering of footnote references in the `RichTextBlockWithFootnotes` block:

1. Moves reference rendering from an inner function in the `replace_footnote_tags()` method to a separate `render_footnote_tag()` method on the `RichTextBlockWithFootnotes` block class. This provides an easy extension point for subclasses of `RichTextBlockWithFootnotes` to customize rendering that doesn't require duplication of a lot of other code.
2. The default implementation of `render_footnote_tag` renders using a Django template, optionally set with the `WAGTAIL_FOOTNOTES_REFERENCE_TEMPLATE` setting, allowing users to override rendering by providing a different template to that setting.

This is similar in spirit to @an-ant0ni0's proposal in torchbox#27, however we've chosen to move rendering out of Python f-strings altogether and into Django (or any other configured engine's) templates.
* Add backwards-compatible locale verbose_name migration

Wagtail 6.2 alters the Locale model on TranslatableMixin, adding a verbose_name. Because Footnote inherits from TranslatableMixin, it needs a new migration generated for Wagtail 6.2.

To maintain compatibility with Wagtail <= 6.1, this change makes the migration a noop. See torchbox#71 for context.

* Remove Wagtail 6.0 from test matrix

Co-authored-by: Dan Braghiș <[email protected]>
* Use frozen constraints in tox
  forces the exact Django/Wagtail versions
* Bump ruff version
* Tidy up tox config
* Update changelog and bump version to 0.12
* Tweak migration dependency
@nickmoreton
Copy link
Collaborator Author

No longer required

@nickmoreton nickmoreton deleted the support/wagtail-62 branch November 18, 2024 16:01
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.

4 participants