When using the Avg
aggregate for a models.DecimalField
, the returned value is a float
, instead of a decimal.Decimal
. Is this because my specific database (in this case sqlite3) doesn't support aggregate values as decimals? If so, are there databases that do? Is there a way around this (ie, a way to get the value back as a decimal), so that accurate decimal math can be done (also, without converting the float
to a str
and then back to a decimal.Decimal
)?
Note: I'm not trolling for fights with people who believe that "accurate enough" is the same as "accurate", or flame baiting for discussions about the Star Ship Enterprise crashing due to erroneous, float-based arithmetic.