-
Notifications
You must be signed in to change notification settings - Fork 2
Release 4.0.0
Michael Beaton edited this page Feb 9, 2024
·
5 revisions
Warning
This update alters fields on MentionableMixin
so you will need to run makemigrations
and migrate
after upgrading!
Note
Wiki pages are now live! These will be kept up-to-date going forwards but may not be useful for pre-4.0 versions.
-
allow_outgoing_webmentions
default now configurable viasettings.WEBMENTIONS_ALLOW_OUTGOING_DEFAULT
. - Removed
slug
field. If you use this field you can restore the previous behaviour by adding the following to your model.
class MyModel(MentionableMixin, models.Model):
slug = models.SlugField(unique=True)
@classmethod
def resolve_from_url_kwargs(cls, slug, **url_kwargs):
return cls.objects.get(slug=slug)
- Deprecated method
all_text
, replaced byget_content_html
. Overridingall_text
still works for now but will log a warning asking you to rename the method.
- Moved template files to
mentions
sub-directory. If you have custom overrides of these templates in your roottemplates/
directory please move them totemplates/mentions/
. - Admin-facing strings are now translatable.
- Fix: Relative URLs in
h-card
homepage or avatar are now resolved to absolute URLs.
Added urlpatterns
helper functions mentions_path
, mentions_re_path
for (hopefully) simpler setup. See the wiki for examples.
- More straightforward view-to-model mapping.
- Removes the need to implement
resolve_from_url_kwargs
on yourMentionableMixin
implementation.
See the wiki for setup instructions. tl;dr:
-
Page
models should implementMentionableMixin
as usual. -
RoutablePageMixin
should use the new@mentions_wagtail_path
,@mentions_wagtail_re_path
decorators in place of the Wagtail equivalents@path
,@re_path
.
Added user agent header to all network requests, customisable via settings.WEBMENTIONS_USER_AGENT: str
.