Hi,

Django's DecimalField requires both max_digits and decimal_places. Database 
backends allow them to be dropped, to specify an "unlimited precision" field. 
Adding support for this in Django is probably not very helpful for new apps, 
but can help significantly in using Django against legacy databases. I have 
opened ticket #24920[1] to track this feature.

I'm raising it here (at Tim's kind suggestion) because there's a bit of a 
design decision to be made about implementing it: Supporting it in the 
existing DecimalField class would lead to quite ugly code with repeated 
branching on whether the attributes have values or not. It would be 
significantly nicer to do this in a new field type. But that discrepancy 
between 
field type and database type would probably be a less-than-optimal public API.

What do you think?

Shai.


[1] https://code.djangoproject.com/ticket/24920

Reply via email to