expephalon/core/fields/numbers.py
2020-06-04 08:03:35 +02:00

7 lines
No EOL
227 B
Python

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)