I am trying to add a creation_time attribute to my documents. The following would be an example:
creation_time
import datetime class MyModel(mongoengine.Docu
You could use auto_now_add parameter as per documentation:
class MyModel(mongoengine.Document): creation_date = mongo.DateTimeField(auto_now_add = True) modified_date = mongo.DateTimeField(auto_now = True)