Stefan Wojcik
2904ce091b
add ability to filter the generic reference field by ObjectId and DBRef
2016-12-04 18:13:24 -05:00
Stefan Wójcik
eb743beaa3
fix doc.get_<field>_display + unit test inspired by #1279 ( #1419 )
2016-12-04 00:34:24 -05:00
Emmanuel Leblond
07018b5060
Raise DoesNotExist when dereferencing unknown document
2016-11-17 09:21:34 +01:00
Gang Li
2c4536e137
redo fix for ListField loses use_db_field when serializing #1217
...
The new fix reverted the change on BaseField to_mongo so that it will not force
new field class to add kwargs to to_mongo function. The new derived field class
to_mongo can support use_db_field and fields parameters as needed.
Basically all field classes derived from ComplexBaseField support those parameters.
2016-09-06 17:27:47 -04:00
iici-gli
e5b6a12977
Merge pull request #1 from MongoEngine/master
...
pull new changes from original
2016-09-04 23:43:04 -04:00
Omer Katz
43d48b3feb
Merge pull request #1271 from maitbayev/master
...
Fixes unicode bug in EmbeddedDocumentListField
2016-04-17 09:15:23 +03:00
Neurostack
00430491ca
Fixed bug accessing ListField (BaseList) with negative indices
...
If you __setitem__ in BaseList with a negative index and then try to save this, you will get an error like: OperationError: Could not save document (cannot use the part (shape of signal.shape.-1) to traverse the element ({shape: [ 0 ]})). To fix this I rectify negative list indices in BaseList _mark_as_changed as the appropriate positive index. This fixes the above error.
2016-03-31 08:04:19 -06:00
Madiyar Aitbayev
109202329f
Handles unicode correctly EmbeddedDocumentListField
2016-03-31 02:33:13 +01:00
Omer Katz
7ad7b08bed
Merge pull request #1267 from wishtack/hotfix-map-field-unicode-key
...
Fix MapField in order to handle unicode keys.
2016-03-26 09:06:24 +03:00
Younes JAAIDI
4650e5e8fb
Fix MapField in order to handle unicode keys.
2016-03-25 12:42:00 +01:00
Gilb's
d9b3a9fb60
Use six integer types instead of explicit types, since six is now a dependency of the project.
2016-03-18 19:51:09 +01:00
Gilb's
d651d0d472
Fix tests and imports. issue #1253
2016-03-18 19:45:34 +01:00
Gilbert Gilb's
87a2358a65
Fix unused variable. issue #1253
2016-03-18 19:45:34 +01:00
Gilbert Gilb's
7cc1a4eba0
Fix long fields stored as int32 in Python 3. issue #1253
2016-03-18 19:45:34 +01:00
Konstantin Gukov
66b233eaea
Added the six module to test int/long support
2016-03-06 23:01:49 +05:00
Konstantin Gukov
fed58f3920
Added support for long values in FloatFields
2016-02-24 14:07:22 +05:00
Emmanuel Leblond
9e9703183f
Add test for nested list in EmbeddedDocument
2016-02-19 02:16:37 +01:00
Emmanuel Leblond
adce9e6220
Raise OperationError in drop_collection if no collection is set
2016-02-19 01:58:15 +01:00
Emmanuel Leblond
c499133bbe
Add missing drop_collection in tests fields
2016-02-19 00:11:30 +01:00
Bryan Bennett
6c9e1799c7
MongoEngine/mongoengine #1217 : Curry **kwargs through to_mongo on fields
2016-01-26 08:34:52 -05:00
Ashley Whetter
f96e68cd11
Made type inheritance a validation check for abstract references
2015-11-23 13:20:35 +00:00
Ashley Whetter
013227323d
ReferenceFields can now reference abstract Document types
...
A class that inherits from an abstract Document type is stored in the database
as a reference with a 'cls' field that is the class name of the document being
stored.
Fixes #837
2015-11-23 13:20:35 +00:00
Gang Li
5bbfca45fa
Fixed: ListField minus index assignment does not work #1119
...
Add code to detect '-1' as a integer.
Normalize negative index to regular list index
Added list assignment test case
2015-10-12 10:34:26 -04:00
Emmanuel Leblond
736fe5b84e
Fix unwanted dereference in DictField (issue #1058 )
2015-08-30 10:01:24 +02:00
Emmanuel Leblond
a5fb009b62
Fix GenericReferenceField choices with DBRef and let it possible to set Document choice as string
2015-07-06 02:33:43 +02:00
amitlicht
d7a2ccf5ac
Adding a test case for #1047 .
2015-06-30 15:03:06 +03:00
Matthieu Rigal
0aeb1ca408
Various fixes again
2015-06-24 00:50:36 +02:00
Vicky Donchenko
6bd9529a66
Allow to add custom metadata to fields
2015-06-23 16:25:56 +03:00
Matthieu Rigal
7714cca599
Removed get_or_create() method, deprecated since 0.8
2015-06-12 20:51:59 +02:00
Matthieu Rigal
42511aa9cf
Merge pull request #1028 from MRigal/fix/652-url-field-validation-too-restrictive-use-django-validation
...
Updated URL and Email regex validators, added schemes to url validator
2015-06-12 20:47:58 +02:00
Matthieu Rigal
4c1496b4a4
Updated URL and Email field regex validators, added schemes arg to urlfield
2015-06-12 13:10:36 +02:00
Matthieu Rigal
3093175f54
SequenceField for abstract classes now have a proper name
2015-06-12 11:03:52 +02:00
Charanpal Dhanjal
ad81470d35
Put space after hash
2015-06-02 10:17:17 +01:00
Charanpal
2753e02cda
Fix for case where Document is deleted and it's files (FieldFields) in GridFS remain.
2015-05-23 14:46:56 +01:00
David Bordeynik
94eac1e79d
Merge pull request #946 from MRigal/fix/pymongo3-connection
...
fixes #946
2015-05-11 15:51:51 +03:00
Eli Boyarski
73f0867061
Unit Test - Unique Multikey Index
...
Adds a unit test to exhibit the behavior of MongoDB when using a unique
multikey index. MongoDB treats any missing unique multikey index value
as NULL, thus throwing a Duplicate Key Error when saving multiple
missing values.
See #930 for more information.
- Closes #930
- Closes #952
2015-05-07 11:16:47 -04:00
mrigal
571a7dc42d
Fix last issue with binary field as primary key and skipped new test
2015-05-07 12:47:30 +02:00
mrigal
76adb13a64
Minor text and comments enhancements
2015-05-07 12:47:30 +02:00
mrigal
c44891a1a8
changed unittest to call for compatibility with Python 2.6
2015-05-07 12:47:30 +02:00
mrigal
a5c2fc4f9d
reinforced test for BinaryField being a Primary Key
2015-05-07 12:47:30 +02:00
mrigal
e80322021a
corrected and enhanced geo_index test
2015-05-07 12:47:29 +02:00
rma4ok
0949df014b
[fix] SortedListField: update whole list if order is changed
2015-05-06 09:40:08 -04:00
Gregor Kališnik
4b8344082f
Testing if we can query embedded document's field inside MapField. Part of #912 , which is fixed in 0.9.
2015-05-05 12:49:45 +02:00
Omer Katz
3f14958741
Merge pull request #957 from noirbizarre/metastrict
...
Allow to loads undeclared field with meta attribute (fix #934 )
2015-04-29 19:32:26 +03:00
Jimmy Shen
2ffdbc7fc0
fixed microsecond-level ordering/filtering bug with ComplexDateTimeField as well as unused separator option
2015-04-19 03:26:14 -04:00
Axel Haustant
ddbcc8e84b
Ensure meta.strict does not bypass constructor check
2015-04-13 18:48:42 +02:00
Axel Haustant
cd2d9517a0
Added 'strict' meta parameter
2015-04-13 17:49:08 +02:00
David Bordeynik
de0e5583a5
Fix #595 : Support += and *= for ListField
2015-03-29 09:28:26 +03:00
J. Fernando Sánchez
2d075c4dd6
Added test for new_file after saved as none. #714
2015-03-23 12:21:21 +02: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