Opened 17 years ago

Closed 17 years ago

#6197 closed (fixed)

Please add formfield_callback arg to newforms.models.ModelFormMetaclass.__new__().

Reported by: guido@… Owned by: nobody
Component: Forms Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I've run into a use case where I want to subclass the metaclass in order to provide a different way to map models to form fields. Right now I have to copy all of ModelFormMetaclass.new() in order to override the formfield_callback argument in the call to fields_for_model() in new().

I'll attach a patch too.

Attachments (2)

models.diff (1.3 KB ) - added by guido@… 17 years ago.
patch for newforms/models.py
models.2.diff (1.3 KB ) - added by guido@… 17 years ago.
Fixes typo in previous patch

Download all attachments as: .zip

Change History (3)

by guido@…, 17 years ago

Attachment: models.diff added

patch for newforms/models.py

by guido@…, 17 years ago

Attachment: models.2.diff added

Fixes typo in previous patch

comment:1 by Malcolm Tredinnick, 17 years ago

Resolution: fixed
Status: newclosed

(In [6940]) Fixed #6197 -- Added (optional) formfield_callback argument to ModelForms.new. Patch from guido@….

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