Skip to content

Commit

Permalink
Push for release
Browse files Browse the repository at this point in the history
  • Loading branch information
Nigel2392 committed Apr 15, 2024
1 parent b33636d commit a5431d0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = wagtail_fedit
version = 1.5.0a3
version = 1.5.0
description = Frontend editing for your Wagtail site
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down
12 changes: 6 additions & 6 deletions wagtail_fedit/templatetags/fedit.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,13 @@ def wrap_adapter(request: HttpRequest, adapter: BaseAdapter, context: dict, run_
)

@register.simple_tag(takes_context=True)
def render_adapter(context: dict, adapter: BaseAdapter) -> str:
context = context.flatten()
def render_adapter(context: Context, adapter: BaseAdapter) -> str:
parent_context = {}

parent_context = context.pop("parent_context", {})
if isinstance(parent_context, Context):
parent_context = parent_context.flatten()
if "parent_context" in context:
parent_context = context["parent_context"]
del context["parent_context"]

context.update(parent_context)

context["wagtail_fedit_field"] = adapter.field_name
Expand Down
1 change: 1 addition & 0 deletions wagtail_fedit/test/core/tests/test_adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ def test_context_processors_run(self):
True,
)

# In this test we are testing the adapter - not the template.
tpl = tpl.render(
Context({
"request": request,
Expand Down

0 comments on commit a5431d0

Please sign in to comment.