Stefan Wójcik
466935e9a3
Unicode support in EmailField ( #1527 )
2017-04-16 13:58:58 -04:00
Omer Katz
972ac73dd9
Merge pull request #1497 from userlocalhost/feature/order_guarantee
...
added a feature to save object data in order
2017-04-07 10:49:39 +03:00
Hiroyasu OHYAMA
d8b238d5f1
Refactored the implementation of DynamicField extension for storing data in order
2017-04-06 00:42:11 +00:00
Richard Fortescue-Webb
58f293fef3
Allow ReferenceFields to take ObjectIds
2017-03-29 10:34:50 +01:00
Hiroyasu OHYAMA
5957dc72eb
To achive storing object data in order with minimum implementation, I
...
changed followings.
- added optional parameter `container_class` which enables to choose
intermediate class at encoding Python data, instead of additional
field class.
- removed OrderedDocument class because the equivalent feature could
be implemented by the outside of Mongoengine.
2017-03-01 09:20:57 +00:00
Hiroyasu OHYAMA
6810953014
added OrderedDynamicField class to store data in the defined order because of #203
2017-02-28 03:34:42 +00:00
Stefan Wójcik
3f31666796
Fix the exception message when validating unicode URLs ( #1486 )
2017-02-24 16:18:34 -05:00
martin sereinig
d8a7328365
Fix docs regarding reverse_delete_rule and delete signals ( #1473 )
2017-02-06 14:11:42 -07:00
Manuel Jeckelmann
9f4b04ea0f
Fix querying an embedded document field by an invalid value ( #1440 )
2016-12-22 13:19:18 -05:00
Stefan Wójcik
835d3c3d18
Improve the health of this package ( #1428 )
2016-12-11 18:49:21 -05:00
Omer Katz
0be6d3661a
Merge branch 'master' of git://github.com/mrTable/mongoengine
2016-12-11 10:52:08 +02:00
Stefan Wójcik
1b9432824b
Add ability to filter the generic reference field by ObjectId and DBRef ( #1425 )
2016-12-09 12:56:06 -05:00
Дмитрий Янцен
7ce8768c19
Added rounding for unicode return value of to_mongo in DecimalField. Closes #1103
2016-12-06 10:42:10 +05:00
Stefan Wójcik
8391af026c
Fix filtering by embedded_doc=None ( #1422 )
2016-12-04 00:32:53 -05:00
Stefan Wójcik
3c455cf1c1
Improve health of this package ( #1409 )
...
* added flake8 and flake8-import-order to travis for py27
* fixed a test that fails from time to time depending on an order of a dict
* flake8 tweaks for the entire codebase excluding tests
2016-11-28 19:00:34 -05:00
Emmanuel Leblond
07018b5060
Raise DoesNotExist when dereferencing unknown document
2016-11-17 09:21:34 +01:00
Thomas Steinacher
6992615c98
Use English spelling for "email address"
2016-10-12 16:59:54 +02: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
Amos Latteier
f35034b989
fix example for register_delete_rule. see issue #1339
2016-07-18 13:23:01 -07: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
7cc1a4eba0
Fix long fields stored as int32 in Python 3. issue #1253
2016-03-18 19:45:34 +01:00
Omer Katz
c6cc0133b3
Merge pull request #1240 from gukoff/long_in_floatfield
...
Added support for long values in FloatFields
2016-03-18 10:24:53 +02:00
Omer Katz
6c2230a076
Merge pull request #1188 from DavidBord/fix-1187
...
fix-#1187: count on ListField of EmbeddedDocumentField fails
2016-03-10 12:18:20 +02: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
Omer Katz
f420c9fb7c
Merge pull request #1235 from hhstore/master
...
fix a small bug - ReferenceField() comment give a wrong demo .
2016-02-24 08:58:40 +02:00
Konstantin Gukov
ddedc1ee92
Fixed too broad exception clauses in the project
2016-02-23 23:50:45 +05:00
hhstore
8f505c2dcc
fix a small bug - ReferenceField() comment give a wrong demo .
2016-02-17 10:55:31 +08:00
Bryan Bennett
6c9e1799c7
MongoEngine/mongoengine #1217 : Curry **kwargs through to_mongo on fields
2016-01-26 08:34:52 -05:00
David Bordeynik
35d3d3de72
fix-#1187: count on ListField of EmbeddedDocumentField fails
2015-12-15 22:27:53 +02:00
Omer Katz
6868f66f24
Merge pull request #1155 from AWhetter/fix837
...
ReferenceFields can now reference abstract Document types
2015-11-23 15:52:54 +02:00
Ashley Whetter
04497aec36
Fixed setting dbref to True on abstract reference fields causing the reference to be stored incorrectly
2015-11-23 13:21:30 +00:00
Ashley Whetter
aa9d596930
Updated documentation for abstract reference changes
2015-11-23 13:21:30 +00: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
Lars Butler
5a038de1d5
fields.ReferenceField: add integer values to reverse_delete_rule
docs
...
When I first tried to use the `reverse_delete_rule` feature of
`ReferenceField`, I had to dig through the source code to find what the
actual integer values were expected to be for DO_NOTHING, NULLIFY,
CASCADE, DENY, and PULL (or at least, where these constants were defined
so that I could import and use them). This patch adds the integer values
for those constants (which are defined in mongoengine.queryset.base) to
the docs so that users can easily choose the correct integer value.
Note: A possible improvement on this change would be to include
`mongoengine.queryset.base` module documentation in the generated docs,
and then update the `ReferenceField` docs to link to the documentation
of these constants (DO_NOTHING, NULLIFY, etc.).
2015-10-05 14:37:03 +02:00
Emmanuel Leblond
736fe5b84e
Fix unwanted dereference in DictField (issue #1058 )
2015-08-30 10:01:24 +02:00
Emmanuel Leblond
34c6790762
Simplify implementation of choices in GenericReferenceField
2015-07-06 10:10:05 +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
9ce605221a
Suggested fix for #1047 : CachedReferenceField creates DBRef on to_python, but can't save them on to_mongo.
...
Dereferencing DBRef to document type before returning it from to_python.
2015-06-28 17:53:20 +03:00
Matthieu Rigal
0aeb1ca408
Various fixes again
2015-06-24 00:50:36 +02:00
mrigal
778c7dc5f2
general pep8 and more clean-up
2015-06-23 23:15:44 +02:00
Matthieu Rigal
2b647d2405
Improved doc for SequenceField
...
Related to issue #497
2015-06-12 21:20: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
Matthieu Rigal
621350515e
Added test was still failing and implemented solution as described in #517
2015-06-03 01:02:19 +02:00
Omer Katz
7d7d0ea001
Use not in instead of not (x in y).
2015-05-08 12:50:34 +03:00
David Bordeynik
a512ccca28
fix-#453: Queryset update doesn't go through field validation
2015-05-02 15:15:02 +03:00