Skip to content

Commit

Permalink
Fix the lose of widget which was added into FieldPanel kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
DylannCordel committed Oct 7, 2024
1 parent 1d2f71f commit 60b91e9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 0.3.1 - 2024-10-07

* Fix the lose of widget which was added into FieldPanel kwargs
(eg: `FieldPanel("slug", wiget=SlugInput)`)


# 0.3.0 - 2024-09-26

* Add a "LanguagesColumn" for SnippetViewset to view in the list which languages are currently translated for instance
Expand Down
2 changes: 1 addition & 1 deletion tbump.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[version]
current = "0.3.0"
current = "0.3.1"

# valid versions:
# we use semver
Expand Down
2 changes: 1 addition & 1 deletion wagtail_parler/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "0.3.0"
__version__ = "0.3.1"
default_app_config = "wagtail_parler.apps.WagtailParlerConfig"
4 changes: 3 additions & 1 deletion wagtail_parler/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,11 @@ def get_edit_handler(self: ModelAdmin) -> TabbedInterface:
and formfield_for_dbfield.__func__.__qualname__ != "ModelViewSet.formfield_for_dbfield"
):
main_form_meta_attrs["formfield_callback"] = self.formfield_for_dbfield
form_options = base_handlers.bind_to_model(self.model).get_form_options()
form_options["fields"] = displayed_fields
base_form_class = build_translations_form(
self.model,
fields_for_model_kwargs={"fields": displayed_fields},
fields_for_model_kwargs=form_options,
base_form=getattr(self, "parler_base_form_class", None),
)
return TabbedInterface(handlers, base_form_class=base_form_class)
Expand Down

0 comments on commit 60b91e9

Please sign in to comment.