Ross Lawley
031c507fde
Merge pull request #224 from dcrosta/user-unique-index
...
User unique index - thanks to @dcrosta
2011-07-11 08:08:52 -07:00
Ross Lawley
0fb629e24c
Added cascading deletes
...
Also ensured that unsetting works when not the default value of a field
2011-07-11 16:01:48 +01:00
Dan Crosta
0847687fd1
don't create extra index on _types ( fix #222 )
...
mongodb will use an index that begins with _types to service queries
against _types, so the extra index is only needed if no other fields are
indexed in the document. to be safe, we explicitly check all indexes to
see if any begins with _types, and only then prevent creation of the
additional index on _types.
2011-07-11 10:15:55 -04:00
Dan Crosta
859de712b4
only create indexes on first collection access ( fix #223 )
2011-07-11 09:44:28 -04:00
Dan Crosta
803164a993
add unique index on User.username
2011-07-11 08:38:43 -04:00
Ross Lawley
147e33c3ca
Merge remote branch 'origin/dev' into dev
2011-07-11 09:23:38 +01:00
Ross Lawley
dc5a613bc7
Fixes conversion of null genericreferences in querysets
...
closes #211
2011-07-11 09:19:27 +01:00
Ross Lawley
16390c1dec
Merge pull request #217 from farazdagi/fix/typo-in-quering-db-docs
...
Fix/typo in quering db docs
2011-07-02 12:18:32 -07:00
Victor Farazdagi
4e6f91ae77
Typo fixed in "Quering The Db" guide.
2011-07-02 19:48:21 +04:00
Ross Lawley
556e620c7a
Fixes recursion error when resetting changed fields
...
Fixes #214 - thanks to wpjunior for the test case
2011-07-01 08:44:46 +01:00
Ross Lawley
8e1d701c27
Fixed infinite recursion bug in _geo_indices()
...
Fixes #213 Thanks to joshink for the bug report
2011-06-30 10:32:05 +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
84e611b91e
Tweak to dereferencing
2011-06-27 16:46:39 +01:00
Ross Lawley
4036e9fe34
Moved private method to make class more readable
2011-06-27 13:17:41 +01:00
Ross Lawley
b039a2293f
Updated documentation about dereferencing
...
Refs #206
2011-06-27 12:42:26 +01:00
Ross Lawley
87f486c4f1
Added select_related() and refactored dereferencing
...
Added a dereference class to handle both select_related
/ recursive dereferencing and fetching dereference.
Refs #206
2011-06-27 12:25:49 +01:00
Ross Lawley
14be7ba2e2
Added support for the $ positional operator
...
closes #205
2011-06-21 14:50:11 +01:00
Ross Lawley
09c32a63ce
Fixes bug with appending post save - due to lists not being reset
2011-06-21 12:34:14 +01:00
Ross Lawley
08ba51f714
Updated geo_index checking to be recursive
...
Fixes #127 - Embedded Documents can declare geo indexes and have
them created automatically
2011-06-20 15:41:23 +01:00
Ross Lawley
e3cd398f70
Changed default collection naming
...
Also added upgrade text
2011-06-20 14:00:06 +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
1b0323bc22
Added document mixin support
...
For extendable / reusable documents
Fixes #204
2011-06-20 09:44:53 +01:00
Ross Lawley
e04e5f42ef
Added test inheriting document from another file works
...
Closes #28
2011-06-20 08:46:40 +01:00
Ross Lawley
c24bc77c17
Fixes depreciation warnings in Django Auth.
...
Closes #156
2011-06-17 15:07:27 +01:00
Ross Lawley
99f923e27f
Fixed queryset repr mid iteration
...
Closes #144
2011-06-17 15:04:07 +01:00
Ross Lawley
f3d265bbe0
Added to_dbref
...
Thanks to Ankhbayar for the initial code
Closes #202
2011-06-17 14:23:40 +01:00
Ross Lawley
5e7efcc8c2
Added 'hint' support, telling Mongo the proper index to use for the query.
...
Judicious use of hints can greatly improve query performance. When doing a query
on multiple fields (at least one of which is indexed) pass the indexed field as
a hint to the query. Hinting will not do anything if the corresponding index
does not exist. The last hint applied to this cursor takes precedence over all
others.
Closes #203
2011-06-17 12:43:28 +01:00
Ross Lawley
62c8823e64
Fixing requirements
...
Test requirements are not install requirements!
2011-06-17 11:39:53 +01:00
Ross Lawley
5cc9188c5b
Improved validation of (Generic)Reference fields
2011-06-16 15:25:09 +01:00
Ross Lawley
5e8604967c
Fixes for django Q query rendering bug
...
Ensures that the QNodes haven't already been processed
Fixes #185
2011-06-16 15:00:10 +01:00
Ross Lawley
cae3f3eeff
Fixes pickling issue with choice fields
...
Removes the dynamic __get_field_display partials before pickling
2011-06-16 12:50:45 +01:00
Ross Lawley
22a7ee5885
Handle old named (referenced) docs
...
Refs #199
2011-06-16 09:56:54 +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
967e72723b
Added note to item_frequencies method.
...
Current implementation is relatively simple, for complex schemas
the user will have to write their own map reduce.
2011-06-15 14:55:38 +01:00
Ross Lawley
5411cc5573
Updated changelog
2011-06-15 11:30:10 +01:00
Ross Lawley
ffb3e8b7b9
Added help_text and verbose_name to fields
...
closes #192
2011-06-15 11:28:41 +01:00
Ross Lawley
94cad89e32
Fixes to item_frequencies - now handles path lookups
...
fixes #194
2011-06-15 11:22:27 +01:00
Ross Lawley
0338ac17b1
Fixes multiple assignment issue preventing saves
...
Thanks to @wpjunior for the ticket and testcase
Also fixed bug in BaseList
fixes #195
2011-06-15 08:57:46 +01:00
Ross Lawley
cb1dfdfac6
Fixes to signals
...
The sender is the class of the document not the instance - easier to
hook into
2011-06-14 16:56:04 +01:00
Ross Lawley
576db9ca88
Fixes DateTimeField handling of date objects.
...
Fixes #191
2011-06-14 15:09:03 +01:00
Ross Lawley
4c2b83d9ca
Remove errant __delete__ method
2011-06-14 15:00:26 +01:00
Ross Lawley
7cb24446ec
Merge remote branch 'origin/dev' into dev
2011-06-14 14:36:30 +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
e518c51de3
Merge pull request #193 from colinhowe/dev
...
Improved Validation warnings - Thanks Colin Howe
2011-06-13 12:52:31 -07:00
Ross Lawley
ea35fb1c54
More robust _present_fields additions
2011-06-13 12:49:09 +01:00
Ross Lawley
7b29378319
Fixes issue converting to mongo
2011-06-13 12:40:12 +01:00
Colin Howe
82fbe7128f
Improve validation warnings
2011-06-10 17:31:42 +01:00
Colin Howe
c1fadcac85
Merge remote branch 'upstream/dev' into dev
2011-06-10 16:50:44 +01:00
Ross Lawley
fd7f882011
Save no longer tramples over documents now sets or unsets explicit fields.
...
Fixes #146 , refs #18
Thanks @zhangcheng for the initial code
2011-06-09 16:09:06 +01:00