#31721: The function modelform_factory does not consider the formfield_callback
of
the form that it recieves as argument
-----------------------------------+--------------------------------------
Reporter: Klaas-Jan Gorter | Owner: nobody
Type: New feature | Status: new
Component: Forms | Version: 2.2
Severity: Normal | Resolution:
Keywords: modelform_factory | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by Simon Charette):
* cc: Claude Paroz (added)
* type: Bug => New feature
Comment:
I was always the impression that `formfield_callback` was solely an
allowed kwarg of the `modelform_factory` function and its friends.
> I believe this test has been removed from version 2, because I find no
equivalent test in tests/model_formsets_regress.
From what I can see the patch from #18573 was never committed and thus
nothing was actually removed over the years.
Given
[https://github.com/django/django/blob/3b1cb78063466e996cbb042e44aadfac30df73fa/tests/model_forms/tests.py#L2820
no tests exists for this behavior] and that
[https://docs.djangoproject.com/en/3.0/search/?q=formfield_callback it's
not documented] I'll change this bug report to a feature request. That
seems like a really niche use case but since I don't use Django forms much
myself nowadays I'll let other folks chime in.
--
Ticket URL: <https://code.djangoproject.com/ticket/31721#comment:5>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/063.d9be1753f630b5b69a4cf4c10a4c55a7%40djangoproject.com.