MCPcopy Index your code
hub / github.com/MongoEngine/mongoengine / to_python

Method to_python

mongoengine/fields.py:607–612  ·  view source on GitHub ↗
(self, value)

Source from the content-addressed store, hash-verified

605 return value
606
607 def to_python(self, value):
608 value = super().to_python(value)
609 # convert datetime to date
610 if isinstance(value, datetime.datetime):
611 value = datetime.date(value.year, value.month, value.day)
612 return value
613
614
615class ComplexDateTimeField(StringField):

Callers

nothing calls this directly

Calls 1

to_pythonMethod · 0.45

Tested by

no test coverage detected