Ross Lawley
a76008e440
Merge pull request #164 from glyphobet/master
...
spherical geospatial operators.
Thanks again to glyphobet
2011-05-16 08:18:22 -07:00
Matt Chisholm
6cf0cf9e7d
slight reordering of test code for clarity
2011-05-10 12:31:31 +02:00
Matt Chisholm
608f08c267
Implement spherical geospatial query operators & unit tests
...
fixes https://github.com/hmarr/mongoengine/issues/163
2011-05-10 12:28:56 +02:00
Ross Lawley
bd3340c73f
Merge pull request #162 from glyphobet/master
...
Comments in unit tests should say "degrees," not "miles":
MongoDB docs are confusing, only the spherical queries $nearSphere and $centerSphere use radians. The $near and $center queries, which are the ones that are used in these mongoengine tests, use the same units as the coordinates. For distances on the earth, this means they use degrees. (This is also why the 2d indexes can be used for other 2d data, not just points on the earth.)
Here's a mongo shell session demonstrating that $near and $center use degrees, and that $nearSphere and $centerSphere are the ones that use radians: https://gist.github.com/964126
So, these mongoengine tests are using $near and $center, which use degrees, not miles, kilometers, or radians.
Thanks glyphobet for the clarification and taking time to explain it!
2011-05-10 02:15:17 -07:00
Nick Vlku Jr
c379ff883a
Merge remote branch 'upstream/master' into dev
2011-05-10 00:13:15 -04:00
Matt Chisholm
3b7a8ce449
change comments to reflect that the geospatial queries use degrees, not miles
2011-05-09 22:29:27 +02:00
Ross Lawley
e9ad04f763
Merge pull request #160 from Ankhbayar/master
...
Added __hash__, __ne__ with test.
Thanks Ankhbayar
2011-05-09 02:28:41 -07:00
Ross Lawley
f0277736e2
Updated queryset to handle latest version of pymongo
...
map_reduce now requires an output.
Reverted previous _lookup_field change, until a test case
is produced for the incorrect behaviour.
2011-05-09 10:22:37 +01:00
Ross Lawley
49c978ad9e
Merge remote branch 'upstream/master'
2011-05-09 09:01:19 +01:00
Harry Marr
eeae1b4aea
Merge pull request #148 from srackham/drop-close-warning
...
Drop gridfs close warning
2011-05-08 06:41:28 -07:00
Harry Marr
9432d1a194
Merge pull request #158 from glyphobet/master
...
tiny documentation fix
2011-05-08 06:40:29 -07:00
Harry Marr
3b2dbf1897
Merge pull request #159 from gregglind/patch-1
...
Tiny spelling correction / clarification.
2011-05-08 06:39:45 -07:00
Gregg Lind
9c1ad5f631
Tiny spelling correction / clarification.
2011-05-04 18:01:06 -07:00
Matt Chisholm
c2fef4e791
error in documentation; need to use keyword arg to create Comment object
2011-05-03 23:50:20 +02:00
Alistair Roche
76cbb66843
Fixed error with _lookup_field
...
It was failing when given multiple fields
2011-04-28 14:31:19 +01:00
Анхбаяр Лхагвадорж
96dbeea171
Added __hash__, __ne__ with test.
2011-04-12 20:23:16 +08:00
Stuart Rackham
829df581f0
Drop gridfs close warning
2011-04-04 15:19:57 +12:00
Stuart Rackham
bd84d08b95
Fixed misspelt variable name.
2011-04-04 13:44:36 +12:00
Stuart Rackham
2c7469c62a
Additional file-like behavior for FileField (optional size arg for read
...
method; fixed seek and tell methods for reading files).
2011-04-03 15:21:00 +12:00
Nick Vlku
6f7d7537f2
Added a test to verify that if a native JS function is put in as a tag, item_frequencies no longer fails (added the word 'watch' as a tag)
2011-03-06 18:59:29 -05:00
Harry Marr
d7c9694be0
Merge branch 'master' of https://github.com/radev/mongoengine into dev
2011-03-06 13:23:30 +00:00
Harry Marr
69171282e9
Merge branch 'master' of https://github.com/lig/mongoengine into dev
...
Conflicts:
.gitignore
2011-03-06 13:11:21 +00:00
Michael Henson
53d66b7267
Added QuerySet.clone() to support copying querysets
2011-01-27 23:51:10 -05:00
Nick Vlku
ba9813e5a3
Fixed Issue 122: item_frequencies doesn't work if tag is also the name of a native js function
...
Did this by checking if the item is a native function, if it is I set it to an initial numeric value. Future occurrences of the tag count correctly.
2011-01-09 22:30:18 -05:00
Harry Marr
ce8b3ea0a1
Merge remote branch 'nvie/dev' into dev
2011-01-09 23:29:11 +00:00
Harry Marr
559fc46037
Merge branch 'master' of https://github.com/sshwsfc/mongoengine into sshwsfc-dev
2011-01-09 23:21:22 +00:00
Harry Marr
10c0b035ae
Merge remote branch 'aleszoulek/dev' into dev
2011-01-09 23:19:41 +00:00
Harry Marr
37818d2d72
Merge branch 'dev' of https://github.com/alefnula/mongoengine into alefnula-dev
2011-01-09 21:00:03 +00:00
Harry Marr
357dd0e7cc
Merge remote branch 'iapain/master' into dev
2011-01-09 20:52:39 +00:00
Serge Matveenko
34b923b7ac
Fix Issue#115: Possibility to bypass class_name check in queryset.
2010-12-21 18:29:51 +03:00
Serge Matveenko
846f5a868f
Fix Issue#116: Use cls instead of User in create_user.
2010-12-21 18:16:00 +03:00
Serge Matveenko
0acb2d904d
Add hidden (.*) files to .gitignore but not the .gitignore itself.
2010-12-21 18:11:33 +03:00
Vincent Driessen
03a757bc6e
Add a safety note on using the new delete rules.
2010-12-21 01:19:27 -08:00
Vincent Driessen
0f68df3b4a
Fix line width.
2010-12-20 05:55:50 -08:00
Vincent Driessen
07ef58c1a7
Rename delete_rule -> reverse_delete_rule.
2010-12-20 05:55:46 -08:00
Vincent Driessen
52f5deb456
Add documentation for the delete_rule argument.
2010-12-20 05:23:27 -08:00
Vincent Driessen
e05e6b89f3
Add safe_update parameter to updates.
2010-12-16 11:54:34 +01:00
Vincent Driessen
ffc8b21f67
Some tests broke over the default None value.
2010-12-14 03:50:49 -08:00
Vincent Driessen
16e1f72e65
Avoid confusing semantics when comparing delete rules.
2010-12-14 03:39:14 -08:00
Vincent Driessen
620f4a222e
Don't check for DO_NOTHING in the delete rule registration method.
...
It is already checked before it is invoked. This saves the ugly import
of DO_NOTHING inside document.py.
2010-12-14 02:03:26 -08:00
Vincent Driessen
f30fd71c5e
Refactor: put the delete rule constants into the queryset module, too.
2010-12-13 13:42:01 -08:00
Vincent Driessen
3b55deb472
Remove unused meta data.
2010-12-13 13:25:49 -08:00
Vincent Driessen
4d5164c580
Use multiple objects in the test.
...
This is to ensure only the intended subset is deleted and not all
objects.
2010-12-13 13:24:20 -08:00
Vincent Driessen
5b118f64ec
Add tests for nullification and denial on the queryset.
2010-12-13 12:54:26 -08:00
Vincent Driessen
07dae64d66
More the deletion code over to the QuerySet object.
...
The Document object doens't have any delete_rule specific code anymore,
and leverages the QuerySet's ability to deny/cascade/nullify its
relations.
2010-12-13 12:36:24 -08:00
Viktor Kerkez
501f033712
Merge remote branch 'hmarr/dev' into dev
2010-12-11 01:40:28 +01:00
Igor Ivanov
a68cb20266
Allow 0 or "" to be used as valid _id value.
2010-12-09 08:38:47 -08:00
Vincent Driessen
3c98a4bff5
Remove accidentally left behind debugging message.
2010-12-06 00:07:30 -08:00
Vincent Driessen
20eb920cb4
Change test docstring.
2010-12-06 00:06:03 -08:00
Vincent Driessen
b06d794854
Implementation of DENY rules.
2010-12-05 23:43:19 -08:00