I've marked the patch as ready for checkin. Instantiating fields without any arguments for decimal field is now supported by all backends. The format_number function has learnt to understand max_digits or decimal_places being None. The format_number function needs review though. When decimal_places is None, the decimal will be rounded to max_digits (using context.prec). I've decided to throw an error if the result is rounded though, so that the value must be within max_digits.
This patch does: - fixes the regression - ignores precision and decimal places for annotations in the base class - documents that model fields for output_field take no args This patch does not: - allow using classes instead of instances - take into consideration any arguments passed to model fields I don't feel that passing classes and then having to instantiate them internally is a nice enough API for the complexity it brings, especially when fields can be created without arguments by the user. If we come across a field that does not allow construction without arguments, then we should fix that field. If, in the future, we do want to support some arguments then users will have a weird choice between passing an instance or a class. As for support of model field arguments, I think that's a separate design decision and patch, and shouldn't hold up fixing the previous behaviour of aggregation over decimal fields. Regards, -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/c6cad148-27ea-4f41-8c50-1755d5a4e5dd%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.