7 lines
227 B
Python
7 lines
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)
|