id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux
19700 BoundField documentation: original field tga nobody "Please add in the documentation a mention on how to get the original field of a BoundField.
Locations:
https://docs.djangoproject.com/en/dev/topics/forms/#looping-over-the-form-s-fields
https://docs.djangoproject.com/en/dev/ref/forms/api/#django.forms.BoundField
In these two locations it would be very useful to have a mention like:
--
'''{{ field.field }}'''
The original field instance, as added to the form object, e.g. a forms.CharField instance.
--
Details:
When adding field programatically to a form, it comes naturally to want to add extra fields to that object and then read them back in the template. However, as the docs clearly state, iterating over a (bound) form returns BoundFields instead of the original Field objects put into the form. There is no mention in the docs how to get to the original field instance in the template.
Cheers!
" New feature closed Documentation 1.4 Normal fixed Unreviewed 0 0 0 0 1 0