Ticket #6542: main.py.patch

File main.py.patch, 750 bytes (added by paradise.qingfeng@…, 17 years ago)
  • main.py

     
    608608                del p[k]
    609609            elif v is not None:
    610610                p[k] = v
    611         return mark_safe('?' + '&'.join([u'%s=%s' % (k, v) for k, v in p.items()]).replace(' ', '%20'))
     611        try:
     612            return mark_safe('?' + '&'.join([u'%s=%s' % (k, v) for k, v in p.items()]).replace(' ', '%20'))
     613        except:
     614            return mark_safe('?' + '&'.join(['%s=%s' % (str(k), v) for k, v in p.items()]).replace(' ', '%20'))
    612615
    613616    def get_results(self, request):
    614617        paginator = ObjectPaginator(self.query_set, self.lookup_opts.admin.list_per_page)
Back to Top