coleifer/peewee — pull request #91 by applegrew (2012-06-02 20:59:55+00:00)
Title: Added auto_round and always_float attributes to DecimalField

* auto_round makes sure that if the value has higher precision than the
number of decimal_places then it round it to that value before send
that to db. This will save from some unexpected "Data truncation"
warnings from MySQL (http://bit.ly/bWr1mn).

* always_float makes sure that in Python code always gets the value as
float instead of Decimal. This way the return value can be easily
intermixed with other floats. Also float can be faster than Decimal.