Why does Django Money show 3 decimals with decimal_places=2?

148 views Asked by At

I'm very confused by this:

>>> from djmoney.models.fields import Money
>>> Money("0.129", "EUR", decimal_places=2)
Money('0.129', 'EUR')

I've expected to see Money('0.12', 'EUR') or Money('0.13', 'EUR').

I know I can use round(2) to get the expected result, but what influence does decimal_places have? If it stores the data anyway, why/when should I use the parameter?

The docs are not helpful.

0

There are 0 answers