From 65985ac0f600fd12fb60922bb7e10d6740c6dbc5 Mon Sep 17 00:00:00 2001 From: Nigel van Keulen Date: Thu, 6 Jun 2024 12:40:30 +0200 Subject: [PATCH] Fix --- setup.cfg | 2 +- wagtail_fedit/templatetags/fedit.py | 3 --- wagtail_fedit/views/adapters.py | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/setup.cfg b/setup.cfg index 3091f37..356ed27 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = wagtail_fedit -version = 1.6.0 +version = 1.6.1 description = Frontend editing for your Wagtail site long_description = file: README.md long_description_content_type = text/markdown diff --git a/wagtail_fedit/templatetags/fedit.py b/wagtail_fedit/templatetags/fedit.py index 1f7f85e..a9ff77d 100644 --- a/wagtail_fedit/templatetags/fedit.py +++ b/wagtail_fedit/templatetags/fedit.py @@ -136,9 +136,6 @@ def render(self, context): except AttributeError: raise TemplateSyntaxError(f"Object {model.__class__.__name__} does not have attribute {getter}") - if PAGE_TEMPLATE_VAR in context and isinstance(obj, Page): - kwargs["wagtail_template_page_instance"] = obj - request = context.get("request") adapter = self.adapter( object=obj, diff --git a/wagtail_fedit/views/adapters.py b/wagtail_fedit/views/adapters.py index 96a576e..94025a8 100644 --- a/wagtail_fedit/views/adapters.py +++ b/wagtail_fedit/views/adapters.py @@ -220,9 +220,6 @@ def get_context_data(self, **kwargs): # Wagtail uses this internally; for example in `{% wagtailpagecache %}` extra[PAGE_TEMPLATE_VAR] = self.instance - if "wagtail_template_page_instance" in self.adapter.kwargs: - extra[PAGE_TEMPLATE_VAR] = self.adapter.kwargs["wagtail_template_page_instance"] - # Form context; used for rendering the modal. if "form" in kwargs: extra.update({