Opened 15 years ago

Closed 13 years ago

Last modified 12 years ago

#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)

list_detail.patch (690 bytes ) - added by Matthias Kestenholz 15 years ago.
fix12418.patch (3.0 KB ) - added by Matthias Kestenholz 14 years ago.

Download all attachments as: .zip

Change History (10)

by Matthias Kestenholz, 15 years ago

Attachment: list_detail.patch added

comment:1 by Russell Keith-Magee, 15 years ago

Needs tests: set
Triage Stage: UnreviewedAccepted

comment:2 by Matthias Kestenholz, 14 years ago

Needs tests: unset

by Matthias Kestenholz, 14 years ago

Attachment: fix12418.patch added

comment:3 by Russell Keith-Magee, 14 years ago

Patch needs improvement: set

Needs to be updated for class-based views.

comment:4 by Matthias Kestenholz, 14 years ago

This bug exists in create_update.py, date_based.py and list_detail.py (at least).

comment:5 by Matt McClanahan, 14 years ago

Severity: Normal
Type: Bug

comment:6 by Claude Paroz, 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 Aymeric Augustin, 13 years ago

Resolution: fixed
Status: newclosed

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})

comment:8 by Matthias Kestenholz, 12 years ago

Thanks!

Note: See TracTickets for help on using tickets.
Back to Top