I'm using Python 3.5.0.
class Example(MappedClass): class __mongometa__: ... _id = FieldProperty(schema.ObjectId) subdoc = FieldProperty( schema.Object({ 'date': FieldProperty(schema.DateTime(if_missing=datetime.now)), ... }) )
Instead, this example works fine:
class Example(MappedClass): class __mongometa__: ... _id = FieldProperty(schema.ObjectId) date = FieldProperty(schema.DateTime(if_missing=datetime.now))
Anonymous