def list_dataTables_json(): # defining columns columns = [] columns.append(ColumnDT('letter', None, col_letter)) columns.append(ColumnDT('name')) columns.append(ColumnDT('region_id', None, col_region)) columns.append(ColumnDT('category_id', None, col_category)) columns.append(ColumnDT('id', None, col_tabs)) columns.append(ColumnDT('id', None, col_photo)) columns.append(ColumnDT('update_time')) columns.append(ColumnDT('id', None, col_operations)) # defining the initial query query = Artist.query # instantiating a DataTable for the query and table needed rowTable = DataTables(request, Artist, query, columns) # returns what is needed by DataTable return jsonify(rowTable.output_result())
def list_dataTables_json(): # defining columns columns = [] columns.append(ColumnDT("letter", None, col_letter)) columns.append(ColumnDT("name")) columns.append(ColumnDT("region_id", None, col_region)) columns.append(ColumnDT("category_id", None, col_category)) columns.append(ColumnDT("id", None, col_tabs)) columns.append(ColumnDT("id", None, col_photo)) columns.append(ColumnDT("update_time")) columns.append(ColumnDT("id", None, col_operations)) # defining the initial query query = Artist.query # instantiating a DataTable for the query and table needed rowTable = DataTables(request, Artist, query, columns) # returns what is needed by DataTable return jsonify(rowTable.output_result())
def list_dataTables_json(): # defining columns columns = [] columns.append(ColumnDT("title")) columns.append(ColumnDT("artist.name")) columns.append(ColumnDT("format_id", None, col_format)) columns.append(ColumnDT("style_id", None, col_style)) columns.append(ColumnDT("difficulty_id", None, col_difficulty)) columns.append(ColumnDT("hits")) columns.append(ColumnDT("id", None, col_files_preview)) columns.append(ColumnDT("update_time")) columns.append(ColumnDT("id", None, col_operations)) # defining the initial query query = Tab.query.join(Artist) # instantiating a DataTable for the query and table needed rowTable = DataTables(request, Tab, query, columns) # returns what is needed by DataTable return jsonify(rowTable.output_result())
def list_dataTables_json(): # defining columns columns = [] columns.append(ColumnDT('title')) columns.append(ColumnDT('artist.name')) columns.append(ColumnDT('format_id', None, col_format)) columns.append(ColumnDT('style_id', None, col_style)) columns.append(ColumnDT('difficulty_id', None, col_difficulty)) columns.append(ColumnDT('hits')) columns.append(ColumnDT('id', None, col_files_preview)) columns.append(ColumnDT('update_time')) columns.append(ColumnDT('id', None, col_operations)) # defining the initial query query = Tab.query.join(Artist) # instantiating a DataTable for the query and table needed rowTable = DataTables(request, Tab, query, columns) # returns what is needed by DataTable return jsonify(rowTable.output_result())