Ticket #4359: unicode-deleted-objects.diff

File unicode-deleted-objects.diff, 1.1 KB (added by anonymous, 17 years ago)
  • contrib/admin/views/main.py

     
    1212from django.http import Http404, HttpResponse, HttpResponseRedirect
    1313from django.utils.html import escape
    1414from django.utils.text import capfirst, get_text_list
    15 from django.utils.encoding import smart_unicode, smart_str
     15from django.utils.encoding import smart_unicode, smart_str, force_unicode
    1616from django.utils.translation import ugettext as _
    1717import operator
    1818
     
    503503
    504504    # Populate deleted_objects, a data structure of all related objects that
    505505    # will also be deleted.
    506     deleted_objects = ['%s: <a href="../../%s/">%s</a>' % (capfirst(opts.verbose_name), object_id, escape(obj)), []]
     506    deleted_objects = ['%s: <a href="../../%s/">%s</a>' % (capfirst(force_unicode(opts.verbose_name)), object_id, escape(obj)), []]
    507507    perms_needed = sets.Set()
    508508    _get_deleted_objects(deleted_objects, perms_needed, request.user, obj, opts, 1)
    509509
Back to Top