__init__.py 979 B

12345678910111213141516171819202122232425262728
  1. # Base module is split into several files for convenience. Files inside of
  2. # this module should import from a specific submodule (e.g.
  3. # `from mongoengine.base.document import BaseDocument`), but all of the
  4. # other modules should import directly from the top-level module (e.g.
  5. # `from mongoengine.base import BaseDocument`). This approach is cleaner and
  6. # also helps with cyclical import errors.
  7. from mongoengine.base.common import *
  8. from mongoengine.base.datastructures import *
  9. from mongoengine.base.document import *
  10. from mongoengine.base.fields import *
  11. from mongoengine.base.metaclasses import *
  12. __all__ = (
  13. # common
  14. 'UPDATE_OPERATORS', '_document_registry', 'get_document',
  15. # datastructures
  16. 'BaseDict', 'BaseList', 'EmbeddedDocumentList', 'LazyReference',
  17. # document
  18. 'BaseDocument',
  19. # fields
  20. 'BaseField', 'ComplexBaseField', 'ObjectIdField', 'GeoJsonBaseField',
  21. # metaclasses
  22. 'DocumentMetaclass', 'TopLevelDocumentMetaclass'
  23. )