For example, if there is custom validation that needs to be done on the
individual inline forms (for example, to raise a `ValidationError`) this
cannot be done easily currently.
I am right now experimenting with `get_formsets_with_inlines` to modify
the individual formsets' forms, but this feels very hackish and I'm not
sure what other side-effects this will have.
--
Ticket URL: <https://code.djangoproject.com/ticket/25130>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
* resolution: => invalid
Old description:
> Similar to how `get_form` allows customization of the admin form, there
> should be a way to customize the inline admin forms.
>
> For example, if there is custom validation that needs to be done on the
> individual inline forms (for example, to raise a `ValidationError`) this
> cannot be done easily currently.
>
> I am right now experimenting with `get_formsets_with_inlines` to modify
> the individual formsets' forms, but this feels very hackish and I'm not
> sure what other side-effects this will have.
New description:
After going through the documentation a few more times, the answer is that
unlike ModelAdmin, the InlineAdmins have a [`.form`
property](https://docs.djangoproject.com/en/1.8/ref/contrib/admin/#django.contrib.admin.InlineModelAdmin.form)
that can be used to control which form is being passed to the factory.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/25130#comment:1>