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

Class Person

tests/document/test_inheritance.py:220–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218 """Ensure that document may inherit fields from a superclass document."""
219
220 class Person(Document):
221 name = StringField()
222 age = IntField()
223
224 meta = {"allow_inheritance": True}
225
226 class Employee(Person):
227 salary = IntField()

Callers 1

Calls 2

StringFieldClass · 0.90
IntFieldClass · 0.90

Tested by 1