mirror of
https://github.com/django/django.git
synced 2025-07-24 05:36:15 +00:00
Fixed #10494 -- Added kwargs to QuerySet.get() error message in the case no objects were found.
Thanks brondsem for the report, Szymon Pyzalski for the patch and oinopion for review. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17917 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
a901654a96
commit
d5b93d3281
4 changed files with 24 additions and 10 deletions
|
@ -93,7 +93,7 @@ access your data. The API is created on the fly, no code generation necessary::
|
|||
>>> Reporter.objects.get(id=2)
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
DoesNotExist: Reporter matching query does not exist.
|
||||
DoesNotExist: Reporter matching query does not exist. Lookup parameters were {'id': 2}
|
||||
|
||||
# Create an article.
|
||||
>>> from datetime import datetime
|
||||
|
|
|
@ -664,7 +664,7 @@ Save these changes and start a new Python interactive shell by running
|
|||
>>> Poll.objects.get(id=2)
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
DoesNotExist: Poll matching query does not exist.
|
||||
DoesNotExist: Poll matching query does not exist. Lookup parameters were {'id': 2}
|
||||
|
||||
# Lookup by a primary key is the most common case, so Django provides a
|
||||
# shortcut for primary-key exact lookups.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue