Renamed project to mongoengine

This commit is contained in:
Harry Marr
2009-11-21 18:41:10 +00:00
parent 5fa01d89a5
commit 3017dc78ed
9 changed files with 10 additions and 10 deletions

20
mongoengine/document.py Normal file
View 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)