Jonathan Prates
c87801f0a9
Using first() from cloned queryset
2014-05-28 17:26:28 -03:00
Jonathan Prates
30964f65e4
Remove orderby in if stmt
2014-05-28 17:06:15 -03:00
Jonathan Prates
ee0c7fd8bf
Change for loop to self.first()
2014-05-28 13:21:00 -03:00
Jonathan Prates
dfdecef8e7
Fix py2 and py3
2014-05-28 09:40:22 -03:00
Jonathan Prates
edcdfeb057
Fix syntax error
2014-05-28 09:03:12 -03:00
Jonathan Prates
47f0de9836
Py3 fix
2014-05-28 08:36:57 -03:00
Clay McClure
07442a6f84
Allow index specs to be composed from raw strings
...
This allows an index spec to reference arbitrary keys of a DictField:
class MyDoc(Document):
frobs = DictField()
meta = {
"indexes": ["frobs.fmep", "frobs.gorp"],
}
2014-05-28 01:31:35 -04:00
Jonathan Prates
3faf3c84be
Avoid to open all documents from cursors in an if stmt
...
Using a cursos in an if statement:
cursor = Collection.objects
if cursor:
(...)
Will open all documents, because there are not an __nonzero__ method.
This change check only one document (if present) and returns True or False.
2014-05-27 16:33:38 -03:00
Ronald van Rij
babbc8bcd6
When using autogenerated document ids in a sharded collection, do set that id back into the Document
2014-05-06 09:34:16 +02:00
Dmitry Konishchev
803caddbd4
Raise NotUniqueError in Document.update() on pymongo.errors.DuplicateKeyError
2014-04-09 14:25:53 +04:00
poly
4d7b988018
Fixed uncorrectly split a query key, when it ends with "_"
2014-04-01 19:52:21 +08:00
Falcon Dai
c1f88a4e14
minor change to geo-related docs
2014-03-17 22:29:53 -05:00
Damien Churchill
1877cacf9c
fix modifying slices under python3
2014-03-12 19:49:43 +00:00
Damien Churchill
2f4978cfea
Merge branch 'dateutil-bug-workaround'
2014-03-12 17:27:04 +00:00
Damien Churchill
d27a1103fa
workaround a dateutil bug
...
In the latest released version of dateutil, there's a bug whereby a TypeError
can be raised whilst parsing a date. This is because it calls a method which
it expects to return 2 arguments, however it can return 1 depending upon the
input, which results in a TypeError: ArgType not iterable exception. Since
this is equivalent to a failed parse anyway, we can treat it the same as a
ValueError.
2014-03-12 17:19:49 +00:00
Damien Churchill
db7f93cff3
improved update queries for BaseDict & BaseList
...
Migrate changes to include updating single elements of ListFields as
well as MapFields by adding the same changes to BaseList. This is
done by ensuring all BaseDicts and BaseLists have the correct name
from the base of the nearest (Embedded)Document, then marking changes
with their key or index when they are changed.
Tests also all fixed up.
2014-03-12 15:07:40 +00:00
Damien Churchill
85e271098f
Merge branch 'master' of https://github.com/MongoEngine/mongoengine
2014-03-12 12:44:04 +00:00
tprimozi
88247a3af9
Bugfix for weakref _instance bug.
2014-03-03 15:11:05 +00:00
Kirill Pavlov
19314e7e06
fix docstring for DictField
2014-03-03 13:09:26 +08:00
Brian Helba
8bcbc6d545
Add authentication_source option to register_connection ( #573 ) ( #580 )
...
Since v2.5, PyMongo has supported a "source" option, to specify a
particular database to authenticate against. This adds support for that
option, in the form of a "authentication_source" option to
register_connection.
2014-03-02 18:35:49 -05:00
Vlad Zloteanu
ef55e6d476
fixes MongoEngine/mongoengine#589
2014-03-01 17:51:59 +01:00
Wilson Júnior
295ef3dc1d
db_alias support and fixes for custom map/reduce output
2014-02-25 15:36:30 -03:00
Frank Battaglia
9d125c9e79
inherit parent Document type _auto_id_field value
2014-02-24 11:10:02 -05:00
Frank Battaglia
db1e69813b
add atomic conditions to save
...
Conflicts:
mongoengine/document.py
2014-02-24 10:57:32 -05:00
Aleksandr Sorokoumov
328e062ae9
Distinct method bugfix
...
Creation of instances is executed now only for EmbeddedDocumentField
and GenericEmbeddedDocumentField in distinct method
2014-02-24 19:21:11 +04:00
tprimozi
0523c2ea4b
Fixed document equality: documents in different collections can have equal ids.
2014-02-13 18:12:33 +00:00
tprimozi
c5c7378c63
Implemented equality between Documents and DBRefs
2014-02-04 13:41:17 +00:00
Brian J. Dowling
b085993901
Allow dynamic dictionary-style field access
...
Allows the doc[key] syntax to work for dynamicembeddeddocument fields
Fixes #559
2014-01-27 23:05:29 +00:00
Andrei Zbikowski
0d4afad342
Fixes issue with recursive embedded document errors
2014-01-24 16:54:29 -06:00
Ross Lawley
0da694b845
0.8.7
2014-01-24 16:23:52 +00:00
Ross Lawley
6d5e7d9e81
Calling reload on deleted / nonexistant documents raises DoesNotExist ( #538 )
2014-01-24 14:10:55 +00:00
Ross Lawley
bc08bea284
Fix circular import issue with django auth ( #531 ) ( #545 )
2014-01-24 13:54:16 +00:00
Ross Lawley
0e5a0661e1
Fixed possible issue not catching duplicate key errors
2014-01-24 13:50:09 +00:00
Ross Lawley
0277062693
Stop ensure_indexes running on a secondaries ( #555 )
2014-01-24 13:17:52 +00:00
Ross Lawley
1b62dd5c40
Fix duplicate error check
2014-01-14 10:01:39 +00:00
Damien Churchill
eacb614750
Merge branch 'master' of https://github.com/MongoEngine/mongoengine
2014-01-10 11:03:48 +00:00
Yohan Graterol
341e1e7a6d
Feature for progressive JPEG. Issue #486
2014-01-08 14:48:34 -04:30
Damien Churchill
2f6890c78a
fix for nested MapFields
...
When using nested MapFields from a document loaded from the database, the
nested dictionaries aren't converted to BaseDict, so changes aren't
marked.
This also includes a change when marking a field as changed to ensure that
nested fields aren't included in a $set query if a parent is already marked
as changed. Not sure if this could occur but it prevents breakage if it does.
2013-12-16 13:44:07 +00:00
Matthew Owen
f7302f710b
Reject email addresses where hostname ends with '.'
2013-12-05 09:50:12 -08:00
Ross Lawley
d1b86fdef5
Fix for import
2013-12-04 13:31:54 +00:00
Ross Lawley
57ac38ddca
Version bump 0.8.5
2013-12-04 10:02:05 +00:00
Ross Lawley
d1b30f4792
Fix auth to use get_user_document
#527
2013-12-04 10:00:12 +00:00
Ross Lawley
16dcf78cab
Ensure id is Hashable
2013-12-02 14:14:46 +00:00
Ross Lawley
d868cfdeb0
Fix multi level nested fields getting marked as changed ( #523 )
2013-11-29 16:24:32 +00:00
Ross Lawley
c074f4d925
Django 1.6 login fix ( #522 )
2013-11-29 13:19:52 +00:00
Ross Lawley
fe8340617a
Merge pull request #509 from j0hnsmith/bson_serializer
...
django 1.6 session problem
2013-11-29 05:10:02 -08:00
Ross Lawley
b024dd913d
EmbeddedDocument._instance is now set when settng the attribute ( #506 )
2013-11-29 13:09:11 +00:00
Ross Lawley
a2a698ab0e
Fixed EmbeddedDocument with ReferenceField equality issue ( #502 )
2013-11-29 12:46:18 +00:00
Ross Lawley
8dcd998945
Merge pull request #499 from drudim/master
...
Error in GenericReferenceField serialization was fixed
2013-11-29 04:06:04 -08:00
Ross Lawley
7200a8cb84
Merge pull request #498 from woakas/patch-1
...
Fixed bug for count method when _none is True
2013-11-29 04:01:45 -08:00