Renamed project to mongoengine
This commit is contained in:
parent
5fa01d89a5
commit
3017dc78ed
9 changed files with 10 additions and 10 deletions
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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue