Errata on example usage of DecimalField

10 views
Skip to first unread message

Yuxin Zhang

unread,
Nov 12, 2019, 7:37:31 PM11/12/19
to Django REST framework
I'm reading the API Guide on Fields in the link https://www.django-rest-framework.org/api-guide/fields/

One of the example usage of DecimalField seems to have an error:

1573605143321.jpg


Instead of validating numbers up to 999 in the original text, it seems to be more precise that the piece of code seralizers.DecimalField(max_digits=5, decimal_places=2) validates numbers up to 999.99.

I wonder if this question could be clarified and expect any validation from others :)
Reply all
Reply to author
Forward
0 new messages