Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
test_durationfield_prepare_value
Method · 0.95
Calls
1
duration_string
Function · 0.90
Tested by
1
test_durationfield_prepare_value
Method · 0.76