#NEWLINE# @ admin . route ( '/issues' , defaults = { #NEWLINE# #INDENT# 'page' : 1 , #NEWLINE# #UNINDENT# } ) #NEWLINE# @ admin . route ( '/issues/page/<int:page>' ) #NEWLINE# def issues( page ) : #NEWLINE# #INDENT# search_form = SearchForm ( ) #NEWLINE# bulk_form = BulkDeleteForm ( ) #NEWLINE# sort_by = Issue . sort_by ( request . args . get ( 'sort' , 'status' ) , request . args . get ( 'direction' , 'asc' ) ) #NEWLINE# order_values = '{0} {1}' . format ( sort_by [ 0 ] , sort_by [ 1 ] ) #NEWLINE# paginated_issues = Issue . query . filter ( Issue . search ( request . args . get ( 'q' , '' ) ) ) . order_by ( text ( order_values ) ) . paginate ( page , 20 , True ) #NEWLINE# return render_template ( 'admin/issue/index.jinja2' , form = search_form , bulk_form = bulk_form , issues = paginated_issues , LABEL = Issue . LABEL )