MCPcopy
hub / github.com/django/django / value_from_datadict

Method value_from_datadict

django/forms/widgets.py:367–372  ·  view source on GitHub ↗

Given a dictionary of data and this widget's name, return the value of this widget or None if it's not provided.

(self, data, files, name)

Source from the content-addressed store, hash-verified

365 return {**base_attrs, **(extra_attrs or {})}
366
367 def value_from_datadict(self, data, files, name):
368 """
369 Given a dictionary of data and this widget's name, return the value
370 of this widget or None if it's not provided.
371 """
372 return data.get(name)
373
374 def value_omitted_from_data(self, data, files, name):
375 return name not in data

Calls 1

getMethod · 0.45