django-rest-framework
django-rest-framework copied to clipboard
DurationField output format
Description
As explained in #8527 this PR will provide the ability to choose the output format for DurationFields.
Since Python builtim timedelta object does not have any format function we are going to allow only formats which are already defined in Django codebase in the package django.utils.duration:
-
duration_string -
duration_iso_string
Thanks - good to talk this through from a docs-first perspective.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.