Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaking change : "form" -> "parler_base_form_class" #5

Open
weber-s opened this issue Sep 27, 2024 · 0 comments
Open

breaking change : "form" -> "parler_base_form_class" #5

weber-s opened this issue Sep 27, 2024 · 0 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@weber-s
Copy link
Member

weber-s commented Sep 27, 2024

It seems that commit 5f9c336 add a breaking change in the base class form of modeladmin/snippet form.

It used to be self.form, and it's now self.parler_base_form_class.
Moreover, this attribute is not documented and may clash with already defined base_form_class, i.e. this edit_handler will not use the custom form and will raise an error:

class CutstomForm(WagtailAdminModelForm):
    variableA = forms.CharField()


class CustomAdmin(ParlerSnippetAdminMixin, SnippetViewSet):
    model = Custom
    edit_handler = ObjectList(
       children=[Field("existing_field"),Field("variableA")],
       base_form_class=CustomForm
    )
@weber-s weber-s added bug Something isn't working documentation Improvements or additions to documentation labels Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant