Upgrade to Wagtail 5.2 #100

Merged
jake merged 10 commits from feature/wagtail-5.2 into master 2024-01-05 17:12:49 +00:00
2 changed files with 2 additions and 8 deletions
Showing only changes of commit 8fe3cdbbc3 - Show all commits

View file

@ -1,8 +1,8 @@
{% load util_tags %}
{% load wagtailcore_tags %}
<section class="container has-text-centered shareon-container" id="shareon">
<p>Share this page</p>
<div class="shareon" data-title="{{ page.title }}" data-url="{% pagefullurl page %}">
<div class="shareon" data-title="{{ page.title }}" data-url="{% fullpageurl page %}">
<a class="facebook" title="Share on Facebook"></a>
<a class="linkedin" title="Share on LinkedIn"></a>
<a class="mastodon" title="Share on Mastodon"></a>

View file

@ -1,6 +1,5 @@
from django.template import Library
from django.utils.encoding import force_str
from wagtail.models import Page
from wagtail.rich_text import RichText
from website.common import utils
@ -13,11 +12,6 @@ def do_range(stop: int) -> range:
return range(stop)
@register.simple_tag(takes_context=True)
def pagefullurl(context: dict, page: Page) -> str:
return page.get_full_url(context["request"])
@register.filter()
def extract_text(html: str | RichText) -> str:
return utils.extract_text(force_str(html))