我无法弄清楚如何在示例查询集中使用Django-RQ:
class PartnerCatalogueView(generic.ListView):
"""
Browse all products in the catalogue
"""
template_name = 'catalogue/partner.html'
paginate_by = 9
model = Product
context_object_name = 'prod'
def get_queryset(self, **kwargs):
queryset = super(PartnerCatalogueView,
self).get_queryset()
queryset = queryset.filter(stockrecords__partner__id=self.kwargs['pk'])
return queryset