#30232: Correct the error message for the invalid DurationField -------------------------------------+------------------------------------- Reporter: Aidas | Owner: nobody Bendoraitis | Type: Bug | Status: new Component: Database | Version: 2.2 layer (models, ORM) | Severity: Normal | Keywords: Triage Stage: | Has patch: 0 Unreviewed | Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 1 UI/UX: 1 | -------------------------------------+------------------------------------- If you enter a duration "14:00" into a duration field, it translates to "00:14:00" which is 14 minutes.
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. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/051.b7c915703a1ace22ddfa2c8fef392704%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.