MCPcopy
hub / github.com/django/django / prepare_value

Method prepare_value

django/forms/fields.py:574–577  ·  view source on GitHub ↗
(self, value)

Source from the content-addressed store, hash-verified

572 }
573
574 def prepare_value(self, value):
575 if isinstance(value, datetime.timedelta):
576 return duration_string(value)
577 return value
578
579 def to_python(self, value):
580 if value in self.empty_values:

Callers 1

Calls 1

duration_stringFunction · 0.90

Tested by 1