@app_template_filter("<STR_LIT>")<EOL><INDENT>def link_order_filter(self, column, modelview_name):<DEDENT>
new_args = request.view_args.copy()<EOL>args = request.args.copy()<EOL>if ("<STR_LIT>" + modelview_name) in args:<EOL><INDENT>args["<STR_LIT>" + modelview_name] = column<EOL>if args.get("<STR_LIT>" + modelview_name) == "<STR_LIT>":<EOL><INDENT>args["<STR_LIT>" + modelview_name] = "<STR_LIT>"<EOL><DEDENT>else:<EOL><INDENT>args["<STR_LIT>" + modelview_name] = "<STR_LIT>"<EOL><DEDENT><DEDENT>else:<EOL><INDENT>args["<STR_LIT>" + modelview_name] = column<EOL>args["<STR_LIT>" + modelview_name] = "<STR_LIT>"<EOL><DEDENT>return url_for(<EOL>request.endpoint,<EOL>**dict(list(new_args.items()) + list(args.to_dict().items()))<EOL>)<EOL>
Arguments are passed like:
    _oc_<VIEW_NAME>=<COL_NAME>&_od_<VIEW_NAME>='asc'|'desc'