Opened 6 years ago

Closed 6 years ago

Last modified 6 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 Changed 6 years ago by Moritz Sichert

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

comment:2 Changed 6 years ago by Tim Graham

Triage Stage: UnreviewedAccepted

comment:3 Changed 6 years ago by Tim Graham

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

comment:4 Changed 6 years ago by Tim Graham

Patch needs improvement: set

Left some comments for improvement on the pull request.

comment:5 Changed 6 years ago by Tim Graham

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:6 Changed 6 years ago by Moritz Sichert

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

comment:7 Changed 6 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In 535809e1:

Fixed #25294 -- Allowed custom BoundFields on forms.

comment:8 Changed 6 years ago by Tim Graham <timograham@…>

In 8550161e:

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

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

In 9b5f1880:

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

Backport of a51070e7434426467869147608c5a8ca58e21e00 from master

comment:10 Changed 6 years ago by Moritz Sichert <moritz.sichert@…>

In a51070e7:

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

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