def genPagination(parser, token):
    """Generates pagination given the current location, and the total number of items."""

    try:
        tokens = token.split_contents()
        tag_name = tokens[0]
        start = tokens[1]
        total = tokens[2]
        openTab = tokens[3]
        query = tokens[4]
        indices = tokens[5]
        sortField = tokens[6]
        sortOrder = tokens[7]
    except ValueError:
        raise template.TemplateSyntaxError(tag_name % "%r tag requires arguments (location, total, openTab, query, indices, sortField, sortOrder).")

    return Paginate(start, total, openTab, query, indices, sortField, sortOrder)
dataset/ETHPy150Open grigorescu/Brownian/Brownian/view/templatetags/es_extras.py/genPagination/swapped operands of `%`