def fourth(): my_list = self.get_users() grid = ObjectGrid(request=request, itemlist=my_list, columns=['user_id', 'username']) grid.exclude_ordering = [] rendered_grid = str(grid) return rendered_grid
def fifth(): my_list = self.get_users() grid = ObjectGrid(request=request, itemlist=my_list, columns=['user_id', 'username', 'action']) grid.column_formats = { 'action': lambda column_number, i, item: '<td>Custom Content</td>' } grid.exclude_ordering = ['action'] rendered_grid = str(grid) return rendered_grid
def second(): my_list = self.get_users() grid = ObjectGrid(request=request, itemlist=my_list, columns=['user_id', 'username']) rendered_grid = str(grid) return rendered_grid