MCPcopy
hub / github.com/django/django / widget_attrs

Method widget_attrs

django/forms/fields.py:226–232  ·  view source on GitHub ↗

Given a Widget instance (*not* a Widget class), return a dictionary of any HTML attributes that should be added to the Widget, based on this Field.

(self, widget)

Source from the content-addressed store, hash-verified

224 return data
225
226 def widget_attrs(self, widget):
227 """
228 Given a Widget instance (*not* a Widget class), return a dictionary of
229 any HTML attributes that should be added to the Widget, based on this
230 Field.
231 """
232 return {}
233
234 def has_changed(self, initial, data):
235 """Return True if data differs from initial."""

Callers 6

__init__Method · 0.95
widget_attrsMethod · 0.45
widget_attrsMethod · 0.45
widget_attrsMethod · 0.45
widget_attrsMethod · 0.45
widget_attrsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected