Ticket #4359: unicode-deleted-objects.diff
File unicode-deleted-objects.diff, 1.1 KB (added by , 17 years ago) |
---|
-
contrib/admin/views/main.py
12 12 from django.http import Http404, HttpResponse, HttpResponseRedirect 13 13 from django.utils.html import escape 14 14 from django.utils.text import capfirst, get_text_list 15 from django.utils.encoding import smart_unicode, smart_str 15 from django.utils.encoding import smart_unicode, smart_str, force_unicode 16 16 from django.utils.translation import ugettext as _ 17 17 import operator 18 18 … … 503 503 504 504 # Populate deleted_objects, a data structure of all related objects that 505 505 # 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)), []] 507 507 perms_needed = sets.Set() 508 508 _get_deleted_objects(deleted_objects, perms_needed, request.user, obj, opts, 1) 509 509