Ticket #4074: 4074.diff
File 4074.diff, 1.2 KB (added by , 17 years ago) |
---|
-
django/contrib/admin/views/main.py
11 11 from django.db.models.query import handle_legacy_orderlist, QuerySet 12 12 from django.http import Http404, HttpResponse, HttpResponseRedirect 13 13 from django.utils.html import escape 14 from django.utils.http import urlencode 14 15 from django.utils.text import capfirst, get_text_list 15 16 from django.utils.encoding import force_unicode, smart_str 16 17 from django.utils.translation import ugettext as _ … … 604 605 if k.startswith(r): 605 606 del p[k] 606 607 for k, v in new_params.items(): 607 if k in p and v is None: 608 del p[k] 609 elif v is not None: 608 if v is None: 609 if k in p: 610 del p[k] 611 else: 610 612 p[k] = v 611 return mark_safe('?' + '&'.join([u'%s=%s' % (k, v) for k, v in p.items()]).replace(' ', '%20'))613 return '?%s' % urlencode(p) 612 614 613 615 def get_results(self, request): 614 616 paginator = ObjectPaginator(self.query_set, self.lookup_opts.admin.list_per_page)