﻿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
13400	model.DoesNotExist exception raised by QuerySet.get() should include the same nice description of parameters that the MultipleObjectsReturned exception does.	aaron	trentm	"The current message contained in a DoesNotExist (ObjectDoesNotExist) exception raised by QuerySet.get(...) is roughly:
""%s matching query does not exist."" % MODEL_NAME

But the MultipleObjectsReturned exception raised by the same function looks like:
""get() returned more than one %s -- it returned %s! Lookup parameters were %s"" % (MODEL_NAME, NUMBER_OF_OBJECTS, KWARGS)

with KWARGS being the keyword arguments passed to the get(...) method.  This is great for investigating error message emails sent from a live site -- it makes it really easy to find out which object you were trying to get, and how to fix the root cause.

I suggest that the DoesNotExist error message would benefit from the same descriptiveness.  I am attaching a patch that adds this information to the model.DoesNotExist exception."	Bug	closed	Database layer (models, ORM)		Normal	duplicate	model.DoesNotExist, ObjectDoesNotExist, QuerySet.get error message kwargs parameters	asokoloski@… Anders Hovmöller	Accepted	1	1	0	1	0	0
