Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#25294 closed New feature (fixed)

Allow custom BoundFields on forms

Reported by: Moritz Sichert Owned by: Moritz Sichert
Component: Forms Version: 1.8
Severity: Normal Keywords: form field BoundField bind_to_form
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I propose adding a new method "bind_to_form()" to
django.forms.Field. It takes a form and a name and returns a BoundField
specific to the Field instance. The default implementation just returns
an instance of the existing BoundField but now it is possible to
customize it.

For more information and discussion see the mailing list thread:
https://groups.google.com/forum/#!topic/django-developers/-Bbi8vg5c9s

Change History (10)

comment:1 by Moritz Sichert, 9 years ago

Has patch: set
Owner: changed from nobody to Moritz Sichert
Status: newassigned

comment:2 by Tim Graham, 9 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Tim Graham, 9 years ago

This was also proposed in #17533. I'll close that one as a duplicate.

comment:4 by Tim Graham, 9 years ago

Patch needs improvement: set

Left some comments for improvement on the pull request.

comment:5 by Tim Graham, 9 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:6 by Moritz Sichert, 9 years ago

I would wait to merge this until #12856 is fixed.

comment:7 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: assignedclosed

In 535809e1:

Fixed #25294 -- Allowed custom BoundFields on forms.

comment:8 by Tim Graham <timograham@…>, 9 years ago

In 8550161e:

Refs #25294 -- Moved BoundField to django.forms.boundfield.

comment:9 by Tim Graham <timograham@…>, 9 years ago

In 9b5f1880:

[1.9.x] Refs #25294 -- Added BoundField import for backwards compatibility.

Backport of a51070e7434426467869147608c5a8ca58e21e00 from master

comment:10 by Moritz Sichert <moritz.sichert@…>, 9 years ago

In a51070e7:

Refs #25294 -- Added BoundField import for backwards compatibility.

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