def get_order_args():
orders = {}<EOL>for arg in request.args:<EOL><INDENT>re_match = re.findall("<STR_LIT>", arg)<EOL>if re_match:<EOL><INDENT>order_direction = request.args.get("<STR_LIT>" + re_match[<NUM_LIT:0>])<EOL>if order_direction in ("<STR_LIT>", "<STR_LIT>"):<EOL><INDENT>orders[re_match[<NUM_LIT:0>]] = (request.args.get(arg), order_direction)<EOL><DEDENT><DEDENT><DEDENT>return orders<EOL>
Get order arguments, return a dictionary
{ <VIEW_NAME>: (ORDER_COL, ORDER_DIRECTION) }

Arguments are passed like: _oc_<VIEW_NAME>=<COL_NAME>&_od_<VIEW_NAME>='asc'|'desc'