Wilson Júnior
bfae93e57e
small fixes for ReferenceField
2012-04-13 04:56:20 -03:00
Adam Parrish
520051af25
preparing values in a ListField won't mangle embedded documents any more
2012-03-21 11:03:49 -07:00
Ross Lawley
b7d0d8f0cc
Added warning to SortedListField
2012-03-05 11:20:22 +00:00
Ross Lawley
a59b518cf2
Updates to imports for future pymongo 2.2
2012-02-17 11:18:25 +00:00
Ross Lawley
6d9bfff19c
Started work on performance
...
Added an initial benchmark.py
Much more performant than 0.5.2 but still work todo.
2011-12-16 12:41:47 +00:00
Ross Lawley
8d2bc444bb
db_alias using in model, queryset, reference fields, derefrence.
2011-12-07 01:16:36 -08:00
Ross Lawley
84f9e44b6c
Fixed GridFS documents can now be pickled
...
Refs #135 #381
2011-12-05 04:16:57 -08:00
Ross Lawley
939bd2bb1f
Updated Documentation
2011-12-02 02:49:16 -08:00
Ross Lawley
6cef571bfb
Added Reverse option to SortedLists
...
Thanks Stephen Young for the patch
closes #364
2011-11-30 02:15:47 -08:00
Ross Lawley
208a467b24
Added dictfield check for Int keys
...
Fixes #371
2011-11-28 07:05:54 -08:00
Wilson Júnior
fa4b820931
added support for db_alias in FileFields
2011-11-22 13:40:01 -02:00
Ross Lawley
e80144e9f2
Added multidb support
...
No change required to upgrade to multiple databases. Aliases are used
to describe the database and these can be manually registered or fall
through to a default alias using connect.
Made get_connection and get_db first class members of the connection class.
Old style _get_connection and _get_db still supported.
Refs: #84 #87 #93 #215
2011-11-22 08:01:14 -08:00
Ross Lawley
558b8123b5
Merge branch 'validation-schema' of https://github.com/n1k0/mongoengine into validation-schema
...
Conflicts:
mongoengine/base.py
mongoengine/fields.py
2011-11-01 01:45:32 -07:00
Ross Lawley
56d1139d71
Added ImageField Support
...
Thanks to @wpjunior for the patch
Closes [#298 ]
2011-10-27 00:58:47 -07:00
Nicolas Perriault
a1db437c42
got rid of assert for validation; ValidationError now extends AssertionError for BC purpose
2011-10-25 22:38:43 +02:00
Nicolas Perriault
7db5335420
fixed URLField.validate() wasn't using BaseField.error() to raise a ValidationError
2011-10-25 10:53:58 +02:00
Nicolas Perriault
3d7b30da77
first version of BC validation schema
2011-10-24 01:02:31 +02:00
Wilson Júnior
b09c52fc7e
fixes for #325 issue
2011-10-19 06:30:41 -02:00
Ross Lawley
3d97c41fe9
Merge pull request #305 from linuxnow/integration/error_msgs
...
Add field name to validation exception messages
2011-10-08 08:13:40 -07:00
Pau Aliagas
3aa2233b5d
Add field name to exception messages
2011-10-04 18:35:32 +02:00
Pau Aliagas
d59862ae6e
Merge remote-tracking branch 'upstream/dev' into integration/uuid
2011-10-04 16:02:58 +02:00
Ross Lawley
6961a9494f
Updates to ComplexFields
...
Required now means they cannot be empty [#302 ]
2011-10-04 04:26:56 -07:00
Pau Aliagas
bec6805296
Add UUIDField
2011-10-04 10:20:41 +02:00
Pau Aliagas
d99c7c20cc
Don't allow empty lists when they are required
...
When using ListField, an empty list is added as the default value.
But when you mark this field as required, you expect it not to be empty,
so this patch makes sure that this is duly checked.
2011-10-04 10:12:21 +02:00
Pau Aliagas
9b4d0f6450
Make sure that ListFields are not strings
2011-10-03 05:29:24 -07:00
Ross Lawley
89c44cd14e
Added missing fields to the api documentation
2011-09-11 08:09:16 +01:00
Ross Lawley
b8a5791de6
Updates to documents
...
[#245 ]
2011-09-09 14:33:27 +01:00
Ross Lawley
2bc3948726
Merge remote branch 'wpjunior/genericembeddedfield' into genericembeddedfield
2011-09-09 06:07:07 -07:00
Ross Lawley
bc9a09f52e
Document updates
2011-09-09 04:21:32 -07:00
Ross Lawley
3f301f6b0f
Finishing touches to where implementation - thanks to dcrosta
...
Refs #242
2011-08-16 10:32:21 +01:00
Wilson Júnior
6471c6e133
added GenericEmbeddedDocumentField
2011-07-27 08:45:15 -03:00
Wilson Júnior
130fb9916d
fixes for SequenceField
2011-07-22 10:19:41 -03:00
Ross Lawley
5834fa840c
Tweaked SequenceField so that it doesn't increment on creation.
...
[refs #238 ]
2011-07-19 16:51:26 +01:00
Wilson Júnior
fa39789bac
added SequenceField
2011-07-18 12:44:28 -03:00
Ross Lawley
dc5a613bc7
Fixes conversion of null genericreferences in querysets
...
closes #211
2011-07-11 09:19:27 +01:00
Ross Lawley
d51d95a28e
Merge pull request #212 from zakj/dev
...
Added GridFSProxy.__nonzero__ - thanks to zakj for the fix
2011-06-30 01:57:00 -07:00
Zak Johnson
3d15a3b3e2
Add GridFSProxy.__nonzero__
...
For documents that do not have a value set for a given field, most field types
return None (or [] in the case of ListField). This makes it easy to test
whether a field has been set using "if doc.field". FileFields, on the other
hand, always return a GridFSProxy. Adding GridFSProxy.__nonzero__ which simply
checks for a grid_id allows the same boolean-test pattern for FileFields, as
well.
2011-06-29 20:48:39 -07:00
Ross Lawley
4036e9fe34
Moved private method to make class more readable
2011-06-27 13:17:41 +01:00
Ross Lawley
f41c5217c6
Added a cleaner way to get collection names
...
Also handles dynamic collection naming - refs #180 .
2011-06-20 11:48:12 +01:00
Ross Lawley
5cc9188c5b
Improved validation of (Generic)Reference fields
2011-06-16 15:25:09 +01:00
Ross Lawley
658b85d327
Inconsistent setting of '_cls' broke inherited document referencing
...
Fixes #199
2011-06-15 16:51:49 +01:00
Ross Lawley
576db9ca88
Fixes DateTimeField handling of date objects.
...
Fixes #191
2011-06-14 15:09:03 +01:00
Ross Lawley
0ed79a839d
Added delta tracking to documents.
...
All saves on exisiting items do set / unset operations only on changed fields.
* Note lists and dicts generally do set operations for things like pop() del[key]
As there is no easy map to unset and explicitly matches the new list / dict
fixes #18
2011-06-14 14:35:38 +01:00
Ross Lawley
7b29378319
Fixes issue converting to mongo
2011-06-13 12:40:12 +01:00
Ross Lawley
b2848b8519
Added ComplexDateTimeField
...
Thanks to @pelletier for the code.
Refs #187
2011-06-09 14:20:21 +01:00
Ross Lawley
4b9bacf731
Added ComplexBaseField
...
* Handles the efficient lazy dereferencing of DBrefs.
* Handles complex nested values in ListFields and DictFields
* Allows for both strictly declared ListFields and DictFields where the embedded
value must be of a field type or no restrictions where the values can be a mix
of field types / values.
* Handles DBrefences of documents where allow_inheritance = False.
2011-06-09 11:25:24 +01:00
Ross Lawley
cfcd77b193
Added tests displaying datetime behaviour.
...
Updated datetimefield documentation
2011-06-08 10:33:56 +01:00
Ross Lawley
ec7effa0ef
Added DereferenceBaseField class
...
Handles the lazy dereferencing of all items in a list / dict.
Improves query efficiency by an order of magnitude.
2011-06-06 11:04:06 +01:00
Ross Lawley
5d778648e6
Inital tests for dereferencing improvements
2011-05-27 11:33:40 +01:00
Alistair Roche
bf6f03a412
Improved MapFields setting
2011-05-25 17:25:39 +01:00