title: Mongoengine creation_time attribute in Document
body: <p>I am trying to add a <code>creation_time</code> attribute to my documents. The following would be an example:</p>
  
  <pre><code>import datetime
  
  class MyModel(mongoengine.Document):
      creation_date = mongo.DateTimeField()
      modified_date = mongo.DateTimeField(default=datetime.datetime.now)
  </code></pre>
  
  <p>Django models have built in parameter for their <code>DateTimeField</code> objects like <code>add_now</code>, etc.,
  but MongoEngine does not support this.</p>
  
  <p>I am wondering if best way to do this is the following:</p>
  
  <pre><code>m,created = MyModel.objects.get_or_create()
  if created:
      m.creation_date = datetime.datetime.now()
  </code></pre>
  
  <p>or if there is a better, nicer way.</p>