{% macro tabulator(table_id, api_url) %} var table = new Tabulator( "#{{table_id}}", { ajaxURL: "{{api_url}}", autoColumns: true, pagination: "remote", paginationDataReceived: { "last_page": "total_pages" } }); {% endmacro %} {% macro pagination_bar(total_pages, curr_page_first_item_index, curr_page_last_item_index, total_items) %} {% if request.args['page'] is not none %} Showing {{curr_page_first_item_index}} - {{curr_page_last_item_index}} items out of {{total_items}} items {% endif %} {% endmacro %}