The current error message for invalid DurationField says that this should
be the format of durations: "[DD] [HH:[MM:]]ss[.uuuuuu]". But according to
the actual behaviour, it should be: "[DD] [[HH:]MM:]ss[.uuuuuu]", because
seconds are mandatory, minutes are optional, and hours are optional if
minutes are provided.
This seems to be a mistake in all Django versions that support the
DurationField.
Also the duration fields could have a default help_text with the requested
format, because the syntax is not self-explanatory.
--
Ticket URL: <https://code.djangoproject.com/ticket/30232>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => avas9366
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/30232#comment:1>
* has_patch: 0 => 1
Comment:
I have created a pull request # 11049.
--
Ticket URL: <https://code.djangoproject.com/ticket/30232#comment:2>
* stage: Unreviewed => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/30232#comment:3>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"9681e968ebdcd58cac99c1e60f0a6932abd4e5c9" 9681e968]:
{{{
#!CommitTicketReference repository=""
revision="9681e968ebdcd58cac99c1e60f0a6932abd4e5c9"
Fixed #30232 -- Corrected expected format in invalid DurationField error
message.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30232#comment:4>