Esempio n. 1
0
        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
Esempio n. 2
0
        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
Esempio n. 3
0
        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