def build_paged_url(request):
 base = request.build_absolute_uri(request.path)
 items = [(k, v) for k in request.GET if (k != 'page') for v in request.GET.getlist(k) if v]
 qsa = urlencode(items)
 return (u'%s?%s' % (base, qsa))

def build_paged_url ( request ) : base = request . build_absolute_uri ( request . path ) items = [ ( k , v ) for k in request . GET if ( k != 'page' ) for v in request . GET . getlist ( k ) if v ] qsa = urlencode ( items ) return ( u'%s?%s' % ( base , qsa ) )
build the url for the paginator .