django - How to set default value for DecimalField in django 1.3?
total_amount = models.DecimalField(max_digits=20, decimal_places=4, default=0.0)
You need to import Decimal.
from decimal import Decimal
total_amount = models.DecimalField(max_digits=20, decimal_places=4, default=0.0)
You need to import Decimal.
from decimal import Decimal