0

我不知道如何在示例查询集中使用 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
4

0 回答 0