diff --git a/docs/guide/defining-documents.rst b/docs/guide/defining-documents.rst index de0e7272..e333674e 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 diff --git a/mongoengine/document.py b/mongoengine/document.py index e64092e8..196662c3 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() diff --git a/mongoengine/fields.py b/mongoengine/fields.py index 3d78e9e3..c06fdd4d 100644 --- a/mongoengine/fields.py +++ b/mongoengine/fields.py @@ -663,9 +663,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):