MCPcopy
hub / github.com/django/django / bound_data

Method bound_data

django/forms/fields.py:213–224  ·  view source on GitHub ↗

Return the value that should be shown for this field on render of a bound form, given the submitted POST data for the field and the initial data, if any. For most fields, this will simply be data; FileFields need to handle it a bit differently.

(self, data, initial)

Source from the content-addressed store, hash-verified

211 return value
212
213 def bound_data(self, data, initial):
214 """
215 Return the value that should be shown for this field on render of a
216 bound form, given the submitted POST data for the field and the initial
217 data, if any.
218
219 For most fields, this will simply be data; FileFields need to handle it
220 a bit differently.
221 """
222 if self.disabled:
223 return initial
224 return data
225
226 def widget_attrs(self, widget):
227 """

Callers 1

valueMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected