Renamed project to mongoengine
This commit is contained in:
20
mongoengine/document.py
Normal file
20
mongoengine/document.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from base import DocumentMetaclass, TopLevelDocumentMetaclass, BaseDocument
|
||||
|
||||
|
||||
__all__ = ['Document', 'EmbeddedDocument']
|
||||
|
||||
|
||||
class EmbeddedDocument(BaseDocument):
|
||||
|
||||
__metaclass__ = DocumentMetaclass
|
||||
|
||||
|
||||
class Document(BaseDocument):
|
||||
|
||||
__metaclass__ = TopLevelDocumentMetaclass
|
||||
|
||||
def save(self):
|
||||
"""Save the document to the database. If the document already exists,
|
||||
it will be updated, otherwise it will be created.
|
||||
"""
|
||||
self.objects._save_document(self)
|
||||
Reference in New Issue
Block a user