views:

182

answers:

2

I need to store a U.S. $ dollar amount in a field of a Django model. What is the best model field type to use? I need to be able to have the user enter this value (with error checking, only want a number accurate to cents), format it for output to users in different places, and use it to calculate other numbers.

A: 

Decimal if django has it.

Spencer Ruport
+12  A: 

A decimal field is the right choice for the currency value.

simplyharsh