#12418 closed Bug (fixed)
object_detail ObjectDoesNotExist message isn't unicode
Reported by: | Matthias Kestenholz | Owned by: | nobody |
---|---|---|---|
Component: | Generic views | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
This leads to messages such as the following if no matching object could be found:
No <django.utils.functional.proxy object at 0x1017b5890> found matching the query
Attachments (2)
Change History (10)
by , 15 years ago
Attachment: | list_detail.patch added |
---|
comment:1 by , 15 years ago
Needs tests: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 14 years ago
Needs tests: | unset |
---|
by , 14 years ago
Attachment: | fix12418.patch added |
---|
comment:3 by , 14 years ago
Patch needs improvement: | set |
---|
comment:4 by , 14 years ago
This bug exists in create_update.py, date_based.py and list_detail.py (at least).
comment:5 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → Bug |
comment:6 by , 13 years ago
Easy pickings: | unset |
---|---|
UI/UX: | unset |
Only deprecated function-based generic views (removed in 1.5) seem to be concerned by this bug.
comment:7 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Yes, the problem is fixed. The equivalent code in django/views/generic/detail.py is:
try: obj = queryset.get() except ObjectDoesNotExist: raise Http404(_(u"No %(verbose_name)s found matching the query") % {'verbose_name': queryset.model._meta.verbose_name})
Note:
See TracTickets
for help on using tickets.
Needs to be updated for class-based views.