class User(Document):
    created_at = DateTimeField(required=True, default=datetime.utcnow)
updated_at = DateTimeField(required=True)


class Post(Document):
    created_at = DateTimeField(required=True, default=datetime.utcnow)
updated_at = DateTimeField(required=True)

def update_timestamp(sender, document, **kwargs):
    document.updated_at = datetime.utcnow()
signals.pre_save.connect(update_timestamp, sender=User)
signals.pre_save.connect(update_timestamp, sender=Post)
Атрибут Mongoengine Creation_Time в документе