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

Method bound_data

django/forms/fields.py:1377–1385  ·  view source on GitHub ↗
(self, data, initial)

Source from the content-addressed store, hash-verified

1375 return converted
1376
1377 def bound_data(self, data, initial):
1378 if self.disabled:
1379 return initial
1380 if data is None:
1381 return None
1382 try:
1383 return json.loads(data, cls=self.decoder)
1384 except json.JSONDecodeError:
1385 return InvalidJSONInput(data)
1386
1387 def prepare_value(self, value):
1388 if isinstance(value, InvalidJSONInput):

Callers

nothing calls this directly

Calls 2

InvalidJSONInputClass · 0.85
loadsMethod · 0.45

Tested by

no test coverage detected