Merge branch 'master' into 391
This commit is contained in:
@@ -160,7 +160,7 @@ class BaseDocument(object):
|
||||
'_fields_ordered', '_dynamic_fields'):
|
||||
if k in data:
|
||||
setattr(self, k, data[k])
|
||||
for k in data.get('_dynamic_fields').keys():
|
||||
for k in data.get('_dynamic_fields', SON()).keys():
|
||||
setattr(self, k, data["_data"].get(k))
|
||||
|
||||
def __iter__(self):
|
||||
|
||||
@@ -279,14 +279,14 @@ class DecimalField(BaseField):
|
||||
:param precision: Number of decimal places to store.
|
||||
:param rounding: The rounding rule from the python decimal libary:
|
||||
|
||||
- decimial.ROUND_CEILING (towards Infinity)
|
||||
- decimial.ROUND_DOWN (towards zero)
|
||||
- decimial.ROUND_FLOOR (towards -Infinity)
|
||||
- decimial.ROUND_HALF_DOWN (to nearest with ties going towards zero)
|
||||
- decimial.ROUND_HALF_EVEN (to nearest with ties going to nearest even integer)
|
||||
- decimial.ROUND_HALF_UP (to nearest with ties going away from zero)
|
||||
- decimial.ROUND_UP (away from zero)
|
||||
- decimial.ROUND_05UP (away from zero if last digit after rounding towards zero would have been 0 or 5; otherwise towards zero)
|
||||
- decimal.ROUND_CEILING (towards Infinity)
|
||||
- decimal.ROUND_DOWN (towards zero)
|
||||
- decimal.ROUND_FLOOR (towards -Infinity)
|
||||
- decimal.ROUND_HALF_DOWN (to nearest with ties going towards zero)
|
||||
- decimal.ROUND_HALF_EVEN (to nearest with ties going to nearest even integer)
|
||||
- decimal.ROUND_HALF_UP (to nearest with ties going away from zero)
|
||||
- decimal.ROUND_UP (away from zero)
|
||||
- decimal.ROUND_05UP (away from zero if last digit after rounding towards zero would have been 0 or 5; otherwise towards zero)
|
||||
|
||||
Defaults to: ``decimal.ROUND_HALF_UP``
|
||||
|
||||
|
||||
1479
mongoengine/queryset/base.py
Normal file
1479
mongoengine/queryset/base.py
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user