﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24302	DurationField form field value populated with instance.__repr__()	Michael Angeletti	Tim Graham	"Or,


== DurationField doesn't accept input in the format of its own output ==

In the admin's add view for a model of mine I entered a 1 day duration in {{{1 0:00}}} format into the input for a {{{DurationField}}} on the model, I saved my model instance. This worked fine, and redirected me back to the admin list view, where that instance's {{{DurationField}}}'s value was displayed as {{{1 day, 0:00:00}}} (default {{{timedelta.__repr__}}}). I visited the instance's change view, where the same input now also contained {{{1 day, 0:00:00}}} (default {{{timedelta.__repr__}}} again). I tried saving the instance again, and received a validation error of {{{'1 day, 0:00:00' value has an invalid format. It must be in [DD] [HH:[MM:]]ss[.uuuuuu] format.}}} (raised in {{{django.db.models.fields.DurationField.to_python}}})."	Bug	closed	Database layer (models, ORM)	1.8alpha1	Release blocker	fixed			Accepted	1	0	0	0	0	0
