Commit Graph
100 Commits
Author SHA1 Message Date
Ross Lawley 3799f27734 Merge branch 'master' of https://github.com/kuno/mongoengine into kuno 2011-09-28 01:51:06 -07:00
Ross Lawley a7edd8602c Added support for expando style dynamic documents.
Added two new classes: DynamicDocument and DynamicEmbeddedDocument
for handling expando style setting of attributes.

[closes #112]
2011-09-28 01:39:39 -07:00
Ross Lawley 1af54f93f5 Merge pull request #287 from wpjunior/fixitem_frequencies
Fix item_frequencies
2011-09-20 06:04:30 -07:00
Ross Lawley f7fbb3d2f6 Relaxed field name checking on embedded documents 2011-09-20 03:45:11 -07:00
Ross Lawley 89c44cd14e Added missing fields to the api documentation 2011-09-11 08:09:16 +01:00
Ross Lawley 8105bfd8b3 Updated changelog for 0.5 release 2011-09-10 13:00:34 +01:00
Ross Lawley 050542c29b Added InvalidDocumentError
Ensures defined documents are valid and users don't override core methods
by accident.

fixes #275
2011-09-09 17:36:40 +01:00
Ross Lawley 60f0491f62 Updated changelog 2011-09-09 17:35:44 +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 ee7d370751 Bumped the version 2011-09-09 05:52:43 -07:00
Ross Lawley a6449a7b2c Updates to documentation in prep for 0.5 2011-09-09 05:45:56 -07:00
Ross Lawley bc9a09f52e Document updates 2011-09-09 04:21:32 -07:00
Ross Lawley 1631788ab6 Now Raise an exception if subclasses are missing at querytime.
Beats returning None thanks to #aid for mentioning it on IRC
2011-08-24 13:37:39 +01:00
Ross Lawley dd49d1d4bb Added choices note to upgrade docs 2011-08-24 13:37:20 +01:00
Ross Lawley d6c54c7c2a Merge remote branch 'origin/dev' into dev 2011-08-18 08:32:33 +01:00
Ross Lawley bda716ef9d Improved update in test case for removing inheritance 2011-08-18 08:30:52 +01:00
Ross Lawley d83d226396 Merge pull request #265 from dcrosta/keeptemp
Update docs for removal of keep_temp
2011-08-17 13:49:55 -07:00
Ross Lawley 91a0e499d9 Updated changelog and authors
Refs #263
2011-08-17 21:48:41 +01:00
Ross Lawley f549d8c0bc Merge pull request #263 from johnarnfield/dev
Added polygon support and unit tests
2011-08-17 13:46:40 -07:00
Ross Lawley 11621c6f5a Removed keeptemp from map_reduce as 0.5 requires pymongo 1.11
Closes #258
2011-08-17 21:38:46 +01:00
Ross Lawley 97ac7e5476 Remove old pymongo version checks
Closes #264
2011-08-17 21:34:35 +01:00
Ross Lawley 8071b23bff Updated upgrade.rst 2011-08-17 14:17:06 +01:00
Ross Lawley 4bfed7e719 Merge pull request #259 from wpjunior/moretests
More tests for ListField(EmbeddedDocumentField
2011-08-17 06:14:52 -07:00
Ross Lawley 3c8cbcfee7 Added tests for showing how to set embedded document indexes
refs #257
2011-08-16 16:50:50 +01:00
Ross Lawley 2a8543b3b7 Updated changelog 2011-08-16 15:26:11 +01:00
Ross Lawley fd2e40d735 Updated changelog 2011-08-16 15:24:37 +01:00
Ross Lawley 8bdb42827c Updated AUTHORS
Thanks to all those that have contributed to MongoEngine
2011-08-16 11:33:41 +01:00
Ross Lawley f6961ae9c1 Merge remote branch 'origin/dev' into dev 2011-08-16 10:33:38 +01:00
Ross Lawley 3f301f6b0f Finishing touches to where implementation - thanks to dcrosta
Refs #242
2011-08-16 10:32:21 +01:00
Ross Lawley 89ad7ef1ab Merge branch 'dev' into feature/where 2011-08-16 09:54:56 +01:00
Ross Lawley 672a5f190b Merge pull request #255 from colinhowe/dev
check for presence of _geo_indices on field class before referencing
2011-08-15 06:39:38 -07:00
Ross Lawley c4db3b6cf2 Merge pull request #247 from spantaleev/double-save-fix
Prevent double saving when doing a forced insert.
2011-08-15 02:28:59 -07:00
Ross Lawley 2b1eb620fc Merge pull request #253 from wpjunior/listreferences
Dereference fails (allow_inheritance = False)
2011-08-15 02:27:40 -07:00
Ross Lawley 048826f6f0 Merge pull request #252 from wpjunior/djangotranslations
Django translation for auth.py
2011-08-15 01:15:28 -07:00
Ross Lawley 3f3f93b0fa Fixing delta bug for dict fields 2011-07-29 15:48:29 +01:00
Ross Lawley e3cbeb9df0 Merge pull request #243 from wpjunior/sequencefield_fixes
Sequencefield fixes
2011-07-22 06:34:43 -07:00
Ross Lawley ac72722e57 Fixing bug setting a value that equates to false 2011-07-22 13:51:11 +01:00
Ross Lawley 72aa191e70 Stop abstract classes being used in the document_registry 2011-07-20 11:58:13 +01:00
Ross Lawley 0d1804461d Updated handling setting of object managers and inheritance 2011-07-19 22:12:09 +01:00
Ross Lawley 5834fa840c Tweaked SequenceField so that it doesn't increment on creation.
[refs #238]
2011-07-19 16:51:26 +01:00
Ross Lawley 5eb895b952 Merge remote branch 'origin/dev' into feature/sequence_field 2011-07-19 16:04:42 +01:00
Ross Lawley d5fb3a9167 Merge pull request #240 from wpjunior/db_field_fixes
Awesome - scarily similar to the patch I started!
2011-07-19 07:37:57 -07:00
Ross Lawley bbd3a6961e Fixed typo in tutorial
[closes #235] Thanks @mulka
2011-07-18 08:35:29 +01:00
Ross Lawley 6eb0387a78 Merge pull request #234 from dcrosta/get-or-404
Get or 404 now handles validation errors as well.
Thanks @dcrosta
2011-07-14 22:38:46 -07:00
Ross Lawley 72995a4b3e Fixed changing default values to False for embedded items 2011-07-13 16:06:40 +01:00
Ross Lawley 7395ce5b22 Updating changelog 2011-07-13 16:05:17 +01:00
Ross Lawley a4c197a83c Added update() convenience method to a document
Thanks to @dcrosta for the initial code
[closes #229]
2011-07-13 14:15:46 +01:00
Ross Lawley 7a3412dc13 Added helper for reseting the index cache 2011-07-13 09:54:41 +01:00
Ross Lawley e079924632 Added extra test for update / update_one
[closes #231]
2011-07-12 14:43:21 +01:00
Ross Lawley cace665858 _delta checking didn't handle db_field_names at all
Fixed and added tests, thanks to @wpjunior and @iapain for initial test cases
[fixes #226]
2011-07-12 10:20:36 +01:00
Ross Lawley 2a8d001213 Improvements to indexes and efficiencies
Thanks to @dcrosta for the patches
closes #225
2011-07-11 17:02:23 +01:00
Ross Lawley a2b0266e01 Merge branch 'dev' into indexpatches 2011-07-11 16:58:17 +01:00
Ross Lawley 1452d3fac5 Fixed item_frequency methods to handle null values
[fixes #216]
2011-07-11 16:50:31 +01:00
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
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
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
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
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
Ross Lawley fb09fde209 Updated changelog 2011-06-09 14:26:52 +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 417bb1b35d Added regression test for #185 2011-06-09 12:15:36 +01:00