From 30d9347272ae561d9af066f8312d44b133cb0d86 Mon Sep 17 00:00:00 2001 From: Ross Lawley Date: Mon, 5 Mar 2012 12:20:59 +0000 Subject: [PATCH 1/4] Updated readme --- README.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index f6866e3e..0b0cb822 100644 --- a/README.rst +++ b/README.rst @@ -3,12 +3,13 @@ MongoEngine =========== :Info: MongoEngine is an ORM-like layer on top of PyMongo. :Author: Harry Marr (http://github.com/hmarr) +:Maintainer: Ross Lawley (http://github.com/rozza) About ===== -MongoEngine is a Python Object-Document Mapper for working with MongoDB. -Documentation available at http://hmarr.com/mongoengine/ - there is currently -a `tutorial `_, a `user guide +MongoEngine is a Python Object-Document Mapper for working with MongoDB. +Documentation available at http://hmarr.com/mongoengine/ - there is currently +a `tutorial `_, a `user guide `_ and an `API reference `_. @@ -84,9 +85,9 @@ the standard port, and run ``python setup.py test``. Community ========= -- `MongoEngine Users mailing list +- `MongoEngine Users mailing list `_ -- `MongoEngine Developers mailing list +- `MongoEngine Developers mailing list `_ - `#mongoengine IRC channel `_ From fcdb0eff8f9c4fd14db52842dec543b50077e7a1 Mon Sep 17 00:00:00 2001 From: Ross Lawley Date: Mon, 5 Mar 2012 12:21:53 +0000 Subject: [PATCH 2/4] Added for read the docs --- requirements.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..8c7d698b --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +pymongo \ No newline at end of file From 61411bb2597f71a32384b64660f8f8a69602c2b1 Mon Sep 17 00:00:00 2001 From: Ross Lawley Date: Mon, 5 Mar 2012 12:26:44 +0000 Subject: [PATCH 3/4] Doc updates --- README.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 0b0cb822..a8588c8c 100644 --- a/README.rst +++ b/README.rst @@ -8,16 +8,16 @@ MongoEngine About ===== MongoEngine is a Python Object-Document Mapper for working with MongoDB. -Documentation available at http://hmarr.com/mongoengine/ - there is currently -a `tutorial `_, a `user guide -`_ and an `API reference -`_. +Documentation available at http://mongoengine-odm.rtfd.org - there is currently +a `tutorial `_, a `user guide +`_ and an `API reference +`_. Installation ============ If you have `setuptools `_ you can use ``easy_install -U mongoengine``. Otherwise, you can download the -source from `GitHub `_ and run ``python +source from `GitHub `_ and run ``python setup.py install``. Dependencies @@ -93,6 +93,6 @@ Community Contributing ============ -The source is available on `GitHub `_ - to +The source is available on `GitHub `_ - to contribute to the project, fork it on GitHub and send a pull request, all contributions and suggestions are welcome! From 520051af25934b577647bd88fd869a275cf65b13 Mon Sep 17 00:00:00 2001 From: Adam Parrish Date: Wed, 11 Jan 2012 16:41:39 -0800 Subject: [PATCH 4/4] preparing values in a ListField won't mangle embedded documents any more --- mongoengine/fields.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mongoengine/fields.py b/mongoengine/fields.py index 14fcca01..13b7ed8e 100644 --- a/mongoengine/fields.py +++ b/mongoengine/fields.py @@ -8,7 +8,7 @@ import uuid from bson import Binary, DBRef, SON, ObjectId from base import (BaseField, ComplexBaseField, ObjectIdField, - ValidationError, get_document) + ValidationError, get_document, BaseDocument) from queryset import DO_NOTHING, QuerySet from document import Document, EmbeddedDocument from connection import get_db, DEFAULT_CONNECTION_NAME @@ -497,6 +497,7 @@ class ListField(ComplexBaseField): def prepare_query_value(self, op, value): if self.field: if op in ('set', 'unset') and (not isinstance(value, basestring) + and not isinstance(value, BaseDocument) and hasattr(value, '__iter__')): return [self.field.prepare_query_value(op, v) for v in value] return self.field.prepare_query_value(op, value)