Ticket #4315: unicode-admin.2.diff

File unicode-admin.2.diff, 906 bytes (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
     15from django.utils.encoding import smart_unicode, smart_str
    1616from django.utils.translation import ugettext as _
    1717import operator
    1818
     
    687687            if i in lookup_params:
    688688                del lookup_params[i]
    689689
     690        for key, value in lookup_params.items():
     691            del lookup_params[key]
     692            lookup_params[smart_str(key)] = smart_str(value)
     693
    690694        # Apply lookup parameters from the query string.
    691695        qs = qs.filter(**lookup_params)
    692696
Back to Top