Opened 8 years ago

Closed 8 years ago

#18573 closed New feature (needsinfo)

formfield_callback attribute on ModelForm not being passed to modelform_factory

Reported by: django@… 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


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:

        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)

0001-test-default-formfield_callback.patch (1.7 KB) - added by tuxcanfly 8 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 8 years ago by Łukasz Rekucki

Triage Stage: UnreviewedAccepted

Changed 8 years ago by tuxcanfly

comment:2 Changed 8 years ago by tuxcanfly

This works as expected on trunk, if I'm not missing anything. Added test.

comment:3 Changed 8 years ago by Claude Paroz

Resolution: needsinfo
Status: newclosed

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.

Note: See TracTickets for help on using tickets.
Back to Top