def make_table(self): config = RequestConfig(self.request, paginate={'per_page': 5}) results = ProjectTable(self.object_list) #order_by = self.form.cleaned_data.get('order_by') order_by = self.request.GET.get('order_by','num_items') if order_by in ('num_items',): order_by = '-'+order_by results.order_by = order_by config.configure(results) return results