Squashed commit of the following:
commit48f988acd7Merge:65269231304f27Author: Ross Lawley <ross.lawley@gmail.com> Date: Thu Jul 26 08:17:45 2012 -0700 Merge pull request #44 from faulkner/fix-notes Proper syntax for RST notes (so they actually render). commit6526923345Author: Ross Lawley <ross.lawley@gmail.com> Date: Thu Jul 26 16:00:32 2012 +0100 Fixed recursion loading bug in _get_changed_fields fixes hmarr/mongoengine#548 commit24fd1acce6Author: Ross Lawley <ross.lawley@gmail.com> Date: Thu Jul 26 14:14:10 2012 +0100 Version bump commitcbb9235dc5Merge:6459d4c19ec2c9Author: Ross Lawley <ross.lawley@gmail.com> Date: Wed Jul 25 15:12:34 2012 +0100 Merge branch 'master' of github.com:hmarr/mongoengine commit19ec2c9bc9Merge:3070e0b601f0ebAuthor: Ross Lawley <ross.lawley@gmail.com> Date: Wed Jul 25 07:12:07 2012 -0700 Merge pull request #545 from maxcountryman/patch-1 Correcting typo in DynamicField docstring commit6459d4c0b6Author: Ross Lawley <ross.lawley@gmail.com> Date: Wed Jul 25 14:55:10 2012 +0100 Fixed issue with custom queryset manager expecting explict variable names If using / expecting kwargs you have to call the queryset manager explicitly. commit1304f2721fAuthor: Chris Faulkner <thefaulkner@gmail.com> Date: Tue Jul 24 14:06:43 2012 -0700 Proper syntax for RST notes (so they actually render). commit598ffd3e5cAuthor: Ross Lawley <ross.lawley@gmail.com> Date: Mon Jul 23 15:32:02 2012 +0100 Fixed documentation commit601f0eb168Author: Max Countryman <maxc@me.com> Date: Fri Jul 20 19:12:43 2012 -0700 Correcting typo in DynamicField docstring
This commit is contained in:
		| @@ -12,7 +12,7 @@ from signals import * | ||||
| __all__ = (document.__all__ + fields.__all__ + connection.__all__ + | ||||
|            queryset.__all__ + signals.__all__) | ||||
|  | ||||
| VERSION = (0, 6, 16) | ||||
| VERSION = (0, 6, 18) | ||||
|  | ||||
|  | ||||
| def get_version(): | ||||
|   | ||||
| @@ -1017,9 +1017,10 @@ Invalid data to create a `%s` instance.\n%s""".strip() % (cls._class_name, error | ||||
|             field_list.update(self._dynamic_fields) | ||||
|  | ||||
|         for field_name in field_list: | ||||
|  | ||||
|             db_field_name = self._db_field_map.get(field_name, field_name) | ||||
|             key = '%s.' % db_field_name | ||||
|             field = getattr(self, field_name, None) | ||||
|             field = self._data.get(field_name, None) | ||||
|             if hasattr(field, 'id'): | ||||
|                 if field.id in inspected: | ||||
|                     continue | ||||
|   | ||||
| @@ -375,7 +375,7 @@ class DynamicDocument(Document): | ||||
|     :class:`~mongoengine.DynamicField` and data can be attributed to that | ||||
|     field. | ||||
|  | ||||
|     ..note:: | ||||
|     .. note:: | ||||
|  | ||||
|         There is one caveat on Dynamic Documents: fields cannot start with `_` | ||||
|     """ | ||||
|   | ||||
| @@ -169,7 +169,7 @@ class IntField(BaseField): | ||||
|     def prepare_query_value(self, op, value): | ||||
|         if value is None: | ||||
|             return value | ||||
|          | ||||
|  | ||||
|         return int(value) | ||||
|  | ||||
|  | ||||
| @@ -199,7 +199,7 @@ class FloatField(BaseField): | ||||
|     def prepare_query_value(self, op, value): | ||||
|         if value is None: | ||||
|             return value | ||||
|          | ||||
|  | ||||
|         return float(value) | ||||
|  | ||||
|  | ||||
| @@ -451,7 +451,7 @@ class GenericEmbeddedDocumentField(BaseField): | ||||
|  | ||||
|     Only valid values are subclasses of :class:`~mongoengine.EmbeddedDocument`. | ||||
|  | ||||
|     ..note :: You can use the choices param to limit the acceptable | ||||
|     .. note:: You can use the choices param to limit the acceptable | ||||
|     EmbeddedDocument types | ||||
|     """ | ||||
|  | ||||
| @@ -483,7 +483,7 @@ class GenericEmbeddedDocumentField(BaseField): | ||||
|  | ||||
|  | ||||
| class DynamicField(BaseField): | ||||
|     """A tryly dynamic field type capable of handling different and varying | ||||
|     """A truly dynamic field type capable of handling different and varying | ||||
|     types of data. | ||||
|  | ||||
|     Used by :class:`~mongoengine.DynamicDocument` to handle dynamic data""" | ||||
| @@ -530,6 +530,8 @@ class ListField(ComplexBaseField): | ||||
|     """A list field that wraps a standard field, allowing multiple instances | ||||
|     of the field to be used as a list in the database. | ||||
|  | ||||
|     If using with ReferenceFields see: :ref:`one-to-many-with-listfields` | ||||
|  | ||||
|     .. note:: | ||||
|         Required means it cannot be empty - as the default for ListFields is [] | ||||
|     """ | ||||
| @@ -766,10 +768,10 @@ class GenericReferenceField(BaseField): | ||||
|     """A reference to *any* :class:`~mongoengine.document.Document` subclass | ||||
|     that will be automatically dereferenced on access (lazily). | ||||
|  | ||||
|     ..note ::  Any documents used as a generic reference must be registered in the | ||||
|     .. note:: Any documents used as a generic reference must be registered in the | ||||
|     document registry.  Importing the model will automatically register it. | ||||
|  | ||||
|     ..note :: You can use the choices param to limit the acceptable Document types | ||||
|     .. note:: You can use the choices param to limit the acceptable Document types | ||||
|  | ||||
|     .. versionadded:: 0.3 | ||||
|     """ | ||||
|   | ||||
| @@ -806,9 +806,9 @@ class QuerySet(object): | ||||
|         keyword argument called :attr:`defaults`. | ||||
|  | ||||
|         .. note:: This requires two separate operations and therefore a | ||||
|         race condition exists.  Because there are no transactions in mongoDB | ||||
|         other approaches should be investigated, to ensure you don't | ||||
|         accidently duplicate data when using this method. | ||||
|             race condition exists.  Because there are no transactions in mongoDB | ||||
|             other approaches should be investigated, to ensure you don't | ||||
|             accidently duplicate data when using this method. | ||||
|  | ||||
|         :param write_options: optional extra keyword arguments used if we | ||||
|             have to create a new document. | ||||
| @@ -816,8 +816,8 @@ class QuerySet(object): | ||||
|  | ||||
|         :param auto_save: if the object is to be saved automatically if not found. | ||||
|  | ||||
|         .. versionchanged:: 0.6 - added `auto_save` | ||||
|         .. versionadded:: 0.3 | ||||
|         .. versionupdated:: 0.6 - added `auto_save` | ||||
|         """ | ||||
|         defaults = query.get('defaults', {}) | ||||
|         if 'defaults' in query: | ||||
| @@ -1882,9 +1882,9 @@ class QuerySetManager(object): | ||||
|         queryset = queryset_class(owner, owner._get_collection()) | ||||
|         if self.get_queryset: | ||||
|             var_names = self.get_queryset.func_code.co_varnames | ||||
|             if var_names == ('queryset',): | ||||
|             if len(var_names) == 1: | ||||
|                 queryset = self.get_queryset(queryset) | ||||
|             elif var_names == ('doc_cls', 'queryset',): | ||||
|             elif len(var_names) == 2: | ||||
|                 queryset = self.get_queryset(owner, queryset) | ||||
|             else: | ||||
|                 queryset = partial(self.get_queryset, owner, queryset) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user