(self, table)
return table
Configure a table using information from the request.

        Arguments:
            table (`~.Table`): table to be configured
Configure a table using information from the request.
Configure a table using information from the request .
def configure(self, table):
        """
        Configure a table using information from the request.

        Arguments:
            table (`~.Table`): table to be configured
        """
        order_by = self.request.GET.getlist(table.prefixed_order_by_field)
        if order_by:
            table.order_by = order_by
        if self.paginate:
            if hasattr(self.paginate, "items"):
                kwargs = dict(self.paginate)
            else:
                kwargs = {}
            # extract some options from the request
            for arg in ("page", "per_page"):
                name = getattr(table, "prefixed_%s_field" % arg)
                try:
                    kwargs[arg] = int(self.request.GET[name])
                except (ValueError, KeyError):
                    pass

            silent = kwargs.pop("silent", True)
            if not silent:
                table.paginate(**kwargs)
            else:
                try:
                    table.paginate(**kwargs)
                except PageNotAnInteger:
                    table.page = table.paginator.page(1)
                except EmptyPage:
                    table.page = table.paginator.page(table.paginator.num_pages)

        table.request = self.request

        return table
def configure ( self , table ) : order_by = self . request . GET . getlist ( table . prefixed_order_by_field ) if order_by : table . order_by = order_by if self . paginate : if hasattr ( self . paginate , "items" ) : kwargs = dict ( self . paginate ) else : kwargs = { } # extract some options from the request for arg in ( "page" , "per_page" ) : name = getattr ( table , "prefixed_%s_field" % arg ) try : kwargs [ arg ] = int ( self . request . GET [ name ] ) except ( ValueError , KeyError ) : pass silent = kwargs . pop ( "silent" , True ) if not silent : table . paginate ( * * kwargs ) else : try : table . paginate ( * * kwargs ) except PageNotAnInteger : table . page = table . paginator . page ( 1 ) except EmptyPage : table . page = table . paginator . page ( table . paginator . num_pages ) table . request = self . request return table