expephalon/core/fields/numbers.py

7 lines
227 B
Python
Raw Normal View History

from django.db.models import DecimalField
class CostField(DecimalField):
def __init__(self, *args, **kwargs):
kwargs['max_digits'] = 32
kwargs['decimal_places'] = 2
super().__init__(*args, **kwargs)