2253 Commits

Author SHA1 Message Date
Omer Katz
4f1d8678ea Merge pull request #896 from MongoEngine/topic/remove-mutable-arguments
Use None instead of mutable arguments
2015-03-01 15:04:27 +02:00
Omer Katz
4bd72ebc63 Use None instead of mutable arguments. 2015-02-27 11:32:06 +02:00
David Bordeynik
fae39e4bc9 Merge pull request #886 from rutsky/patch-1
fix typo: "a the structure" -> "the structure"
2015-02-26 11:38:41 +02:00
David Bordeynik
dbe8357dd5 Merge pull request #883 from jerrysxu/patch-1
Update fields.py
2015-02-26 11:38:33 +02:00
David Bordeynik
3234f0bdd7 Merge pull request #887 from rutsky/patch-2
fix reference format: "attr:`auto_create_index`"
2015-02-20 22:18:39 +02:00
David Bordeynik
47a4d58009 Merge pull request #826 from seglberg/mmelliso/fix#503
EmbeddedDocumentListField (Resolves #503)
2015-02-20 21:53:18 +02:00
Vladimir Rutsky
4ae60da58d fix reference format: "attr:auto_create_index" 2015-02-20 19:59:36 +03:00
Vladimir Rutsky
47f995bda3 fix typo: "a the structure" -> "the structure" 2015-02-20 19:41:20 +03:00
Matthew Ellison
42721628eb Added EmbeddedDocumentListField Implementation
- Added new field type: EmbeddedDocumentListField.
- Provides additional query ability for lists of embedded documents.
- Closes MongoEngine/mongoengine#503.
2015-02-20 11:18:40 -05:00
David Bordeynik
f42ab957d4 Merge pull request #885 from DavidBord/fix-864
Fix #864: ComplexDateTimeField should fall back to None when null=True
2015-02-19 11:46:03 +02:00
Jimmy Shen
ce9d0d7e82 Fix #864: ComplexDateTimeField should fall back to None when null=True 2015-02-19 09:47:38 +02:00
David Bordeynik
baf79dda21 Merge pull request #881 from DavidBord/fix-863
Fix #863: Request Support for $min, $max Field update operators
2015-02-18 11:13:25 +02:00
Jerry Xu
b71a9bc097 Update fields.py
Type name should be "MultiPolygon".
2015-02-17 13:22:02 -08:00
David Bordeynik
129632cd6b Fix #863: Request Support for $min, $max Field update operators 2015-02-17 21:48:25 +02:00
David Bordeynik
aca8899c4d Merge pull request #879 from DavidBord/fix-866
Fix #866:  does not follow
2015-02-16 15:49:06 +02:00
David Bordeynik
5c3d91e65e Fix #866: does not follow 2015-02-16 12:25:37 +02:00
David Bordeynik
0205d827f1 Merge pull request #876 from DavidBord/fix-766
Fix #766: Add support for  operator
2015-02-15 22:05:24 +02:00
David Bordeynik
225c31d583 Fix #766: Add support for operator 2015-02-15 15:05:07 +02:00
David Bordeynik
b18d87ddba Merge pull request #878 from DavidBord/fix-877
Fix #877: Fix tests for pymongo 2.8+
2015-02-15 15:00:35 +02:00
David Bordeynik
25298c72bb Fix #877: Fix tests for pymongo 2.8+ 2015-02-15 10:02:22 +02:00
David Bordeynik
3df3d27533 Merge pull request #873 from DavidBord/fix-872
Fix #872: No module named 'django.utils.importlib' (Django dev)
2015-02-15 09:31:38 +02:00
David Bordeynik
cbb0b57018 Fix #872: No module named 'django.utils.importlib' (Django dev) 2015-02-15 00:10:00 +02:00
David Bordeynik
65f205bca8 Merge pull request #848 from seglberg/choice-subclasses
Field Choices Now Accept Subclasses of Documents
2015-02-06 09:32:47 +02:00
Yohan Graterol
1cc7f80109 Merge pull request #845 from aeroeng/andQ
mongo $and list should not contain list elements in order to avoid this ...
2015-01-22 20:13:53 -05:00
Matthew Ellison
213a0a18a5 Updated Unit Tests for Field Choices of Documents
- Added Unit Test with Invalid EmbeddedDocument Choice.
- Updated Broken Link in Author's File
2015-01-12 10:11:42 -05:00
Matthew Ellison
1a24d599b3 Field Choices Now Accept Subclasses of Documents
- Fields containing 'choices' of which a choice is an
  EmbeddedDocument or Document will now accept subclasses of that
  choice.
2015-01-11 20:54:59 -05:00
aeroeng
d80be60e2b mongo $and list should not contain list elements in order to avoid this error:
$and/$or elements must be objects
2015-01-06 14:49:29 -05:00
Yohan Graterol
0ffe79d76c Merge pull request #823 from mmelliso/mmelliso/fix#812
Ensure Indexes before Each Save (Resolves #812)
2014-12-05 11:01:02 -05:00
Matthew Ellison
db36d0a375 Ensure Indexes before Each Save
- Rely on caching within the PyMongo driver to provide lightweight calls
  while indices are cached.
- Closes MongoEngine/mongoengine#812.
2014-12-04 08:45:15 -05:00
Omer Katz
ff659a0be3 Merge pull request #815 from MRigal/master
fixed bug for queryset.distinct to work also on embedded documents, not ...
2014-12-04 14:21:04 +02:00
Wilson Júnior
8485b12102 Merge pull request #821 from 3lnc/Document.switch_docstring_fix
Fixes #811. Fixes reflinks
2014-12-04 09:28:11 -02:00
Wilson Júnior
d889cc3c5a Merge pull request #825 from idlead/fix/reverse_delete_rules_on_abstract_documents
Fix crash when applying deletion rules
2014-12-04 09:23:59 -02:00
Antoine Français
7bb65fca4e Fix crash when applying deletion rules
When deleting a document references by other, if that refence is
defined on an abstract document, the operation fails, because it tries
to apply deletion on the abstract class which doesn't have a QuerySet.

Fix is simply to ignore document classes which are defined abstract when
applying rules on all classes referencing the document.
2014-12-04 11:34:23 +01:00
mrigal
8aaa5951ca fixed order of list for the test to pass 2014-12-03 13:13:07 +01:00
Matthieu Rigal
d58f3b7520 Merge pull request #1 from thedrow/patch-1
Added a test that verifies distinct operations on nested embedded docume...
2014-12-03 13:10:27 +01:00
Omer Katz
e5a636a159 Added a test that verifies distinct operations on nested embedded documents. 2014-12-03 11:09:05 +02:00
Slam
51f314e907 Doc fixes, thanks @3Inc
Author:    Slam <3lnc.slam@gmail.com>
Date:      Fri Nov 28 13:10:38 2014 +0200
2014-12-02 00:37:06 -02:00
mrigal
531fa30b69 added test for capacity to get distinct on subdocument of a list 2014-12-01 18:20:29 +01:00
Wilson Júnior
2b3bb81fae Refactoring: Simple is better than complex
Signed-off-by: Wilson Júnior <wilsonpjunior@gmail.com>
2014-11-29 23:48:58 -02:00
Rik
80f80cd31f fixed more tests that were using undefined model fields 2014-11-29 23:20:31 -02:00
Rik
79705fbf11 moved initialization of _created before FieldDoesNotExist check
Because otherwise we'll get a FieldDoesNotExist error on the field
_created.
2014-11-29 23:20:30 -02:00
Rik
191a4e569e added ints in string.format() for 2.6 compability 2014-11-29 23:20:30 -02:00
Rik
1cac35be03 using python 2.6 compatible way of assertRaises 2014-11-29 23:20:30 -02:00
Rik
6d48100f44 add test if FieldDoesNotExist is raised
When trying to set an undefined field.
2014-11-29 23:20:30 -02:00
Rik
4627af3e90 add FieldDoesNotExist exception to __all__
So it will be available when you do:
    from mongoengine import *
2014-11-29 23:20:30 -02:00
Rik
913952ffe1 remove unittest test_no_overwritting_no_data_loss
Now that fields need to be defined explicitly, it's not possible to have
another property with the same name on a model.
https://github.com/MongoEngine/mongoengine/pull/457#issuecomment-47513105
2014-11-29 23:20:30 -02:00
Rik
67bf6afc89 fixed tests that were using undefined model fields 2014-11-29 23:20:30 -02:00
Rik
06064decd2 check for dynamic document, exclude id pk and _cls 2014-11-29 23:20:30 -02:00
Rik
4cca9f17df Check if undefined fields are supplied on document
If an undefined field is supplied to a document instance, a
`FieldDoesNotExist` Exception will be raised.
2014-11-29 23:20:30 -02:00
Wilson Júnior
74a89223c0 replaced text_score attribute to get_text_score method
Signed-off-by: Wilson Júnior <wilsonpjunior@gmail.com>
2014-11-29 23:09:26 -02:00