Ticket #4074: 4074-nfa.diff
File 4074-nfa.diff, 1.1 KB (added by , 16 years ago) |
---|
-
django/contrib/admin/views/main.py
6 6 from django.utils.encoding import force_unicode, smart_str 7 7 from django.utils.translation import ugettext 8 8 from django.utils.safestring import mark_safe 9 from django.utils.http import urlencode 9 10 import operator 10 11 11 12 try: … … 100 101 if k.startswith(r): 101 102 del p[k] 102 103 for k, v in new_params.items(): 103 if k in p and v is None: 104 del p[k] 105 elif v is not None: 104 if v is None: 105 if k in p: 106 del p[k] 107 else: 106 108 p[k] = v 107 return mark_safe('?' + '&'.join([u'%s=%s' % (k, v) for k, v in p.items()]).replace(' ', '%20'))109 return '?%s' % urlencode(p) 108 110 109 111 def get_results(self, request): 110 112 paginator = QuerySetPaginator(self.query_set, self.list_per_page)