Opened 7 years ago

Closed 4 years ago

Last modified 4 years ago

#12418 closed Bug (fixed)

object_detail ObjectDoesNotExist message isn't unicode

Reported by: mk Owned by: nobody
Component: Generic views Version: master
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


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 mk 7 years ago.
fix12418.patch (3.0 KB) - added by mk 6 years ago.

Download all attachments as: .zip

Change History (10)

Changed 7 years ago by mk

comment:1 Changed 6 years ago by russellm

  • Needs documentation unset
  • Needs tests set
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 6 years ago by mk

  • Needs tests unset

Changed 6 years ago by mk

comment:3 Changed 6 years ago by russellm

  • Patch needs improvement set

Needs to be updated for class-based views.

comment:4 Changed 6 years ago by mk

This bug exists in, and (at least).

comment:5 Changed 5 years ago by mattmcc

  • Severity set to Normal
  • Type set to Bug

comment:6 Changed 5 years ago by claudep

  • 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 Changed 4 years ago by aaugustin

  • Resolution set to fixed
  • Status changed from new to closed

Yes, the problem is fixed. The equivalent code in django/views/generic/ is:

            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 Changed 4 years ago by mk


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