#25130: Add the ability to specify custom inlinemodeladmin form
-------------------------------+--------------------------------------
Reporter: burhan | Owner: nobody
Type: New feature | Status: closed
Component: contrib.admin | Version: 1.8
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by burhan):
* 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>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.042627960a79f17fc6cf6140ceacf025%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.