这是我的观点:
class FilteredReclamationListView(FilterView, SingleTableView):
table_class = ReclamationTable
model = ReclamationMainModel
template_name = 'reclamation_table/index.html'
filterset_class = ReclamationFilter
table_pagination = {
'per_page': 50
}
def get_table_data(self):
return self.object_list
def get_queryset(self):
return self.model.objects.filter(archive=False).order_by('-id')
在这种情况下,是否可以记住URL参数?怎样?在
我希望用户转到另一个视图,当他回来时,他将看到最后一个查询/过滤器。我读过sessions和request.GET.urlencode()
,但我不能将其应用于我的视图中。在
Aule,你可以在会话中存储过滤器。在
我找到了解决问题的办法。我的第一个观点是:
第二种观点是:
^{pr2}$在模板中,我将返回FilteredReclamationListView的链接改为
{{ filter }}
:相关问题 更多 >
编程相关推荐