From 829df581f03f9a3245e36a7d4f5686e6d5647b91 Mon Sep 17 00:00:00 2001 From: Stuart Rackham Date: Mon, 4 Apr 2011 15:19:57 +1200 Subject: [PATCH 1/3] Drop gridfs close warning --- mongoengine/fields.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/mongoengine/fields.py b/mongoengine/fields.py index e95fd65e..f39d6e6f 100644 --- a/mongoengine/fields.py +++ b/mongoengine/fields.py @@ -623,9 +623,6 @@ class GridFSProxy(object): def close(self): if self.newfile: self.newfile.close() - else: - msg = "The close() method is only necessary after calling write()" - warnings.warn(msg) class FileField(BaseField): From c2fef4e791916117e9df1b7678aaebef4b894ac5 Mon Sep 17 00:00:00 2001 From: Matt Chisholm Date: Tue, 3 May 2011 23:50:20 +0200 Subject: [PATCH 2/3] error in documentation; need to use keyword arg to create Comment object --- docs/guide/defining-documents.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guide/defining-documents.rst b/docs/guide/defining-documents.rst index 106d4ec8..4c9de931 100644 --- a/docs/guide/defining-documents.rst +++ b/docs/guide/defining-documents.rst @@ -134,8 +134,8 @@ document class as the first argument:: class Page(Document): comments = ListField(EmbeddedDocumentField(Comment)) - comment1 = Comment('Good work!') - comment2 = Comment('Nice article!') + comment1 = Comment(content='Good work!') + comment2 = Comment(content='Nice article!') page = Page(comments=[comment1, comment2]) Dictionary Fields From 9c1ad5f631011bf8c5178d1e4ceb292def43c2e6 Mon Sep 17 00:00:00 2001 From: Gregg Lind Date: Wed, 4 May 2011 18:01:06 -0700 Subject: [PATCH 3/3] Tiny spelling correction / clarification. --- mongoengine/document.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mongoengine/document.py b/mongoengine/document.py index fef737db..f15e6836 100644 --- a/mongoengine/document.py +++ b/mongoengine/document.py @@ -67,7 +67,7 @@ class Document(BaseDocument): :param safe: check if the operation succeeded before returning :param force_insert: only try to create a new document, don't allow updates of existing documents - :param validate: validates the document; set to ``False`` for skiping + :param validate: validates the document; set to ``False`` to skip. """ if validate: self.validate()