What is the best way to reuse pagination template in FBV?

#1

In my views, return render(request, 'boards/topics.html', {'board': board, 'topics': topics})
I try to use {% with topics as pages %}, then I can include ‘pagination.html’ to my template for reuse it.
but maybe there are some better ways you can teach me?
Thanks a lot

0 Likes