'Arguments are passed like: psize_<VIEW_NAME>=<PAGE_NUMBER>'

@app_template_filter('link_page_size')
def link_page_size_filter(self, page_size, modelview_name):

    new_args = request.view_args.copy()
    args = request.args.copy()
    args[('psize_' + modelview_name)] = page_size
    return url_for(request.endpoint, **dict((list(new_args.items()) + list(args.to_dict().items()))))
