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

Method to_mongo

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

Source from the content-addressed store, hash-verified

598
599class DateField(DateTimeField):
600 def to_mongo(self, value):
601 value = super().to_mongo(value)
602 # drop hours, minutes, seconds
603 if isinstance(value, datetime.datetime):
604 value = datetime.datetime(value.year, value.month, value.day)
605 return value
606
607 def to_python(self, value):
608 value = super().to_python(value)

Callers

nothing calls this directly

Calls 1

to_mongoMethod · 0.45

Tested by

no test coverage detected