Opened 12 years ago
Closed 12 years ago
#18573 closed New feature (needsinfo)
formfield_callback attribute on ModelForm not being passed to modelform_factory
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Forms | Version: | 1.3 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Solitary ModelForm instances are run though ModelForm.formfield_callback() when they are instantiated. It would be nice if ModelForm instances generated from modelform_factory also did this without having to specify formfield_callback again when calling modelform_factory.
In effect:
modelform_factory( model=AModel, form=AModelForm, formfield_callback=AModelForm.formfield_callback if hasattr(AModelForm, 'formfield_callback') else None )
I am not entirely sure of the terminology. I'm happy to explain further if need be.
Attachments (1)
Change History (4)
comment:1 by , 12 years ago
Triage Stage: | Unreviewed → Accepted |
---|
by , 12 years ago
Attachment: | 0001-test-default-formfield_callback.patch added |
---|
comment:2 by , 12 years ago
comment:3 by , 12 years ago
Resolution: | → needsinfo |
---|---|
Status: | new → closed |
The test also passes on 1.3 and 1.4 branches. Paul, I think it's now your turn to show us the real issue, in the case we misunderstood it.
This works as expected on trunk, if I'm not missing anything. Added test.