How to use Django-RQ in a class based ListView?

100 Views Asked by At

I can't figure out how to use Django-RQ in a sample queryset:

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
0

There are 0 best solutions below