Is there way to paginate another model in class based view in django? I have code like this. I would like to paginate comments is it possible?
class ShopDetailView(VisitCounter, DetailView):
model = Item
template_name = 'shop/detail.html'
context_object_name = 'item'
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['comments'] = Comment.objects.filter(comment_item=self.object)
context['form'] = CommentCreationForm()
return context