1👍
Well, you can solve it like this:
- Install mathfilters:
pip install django-mathfilters - Add ‘mathfilters’ to Installed_Apps
- Replace {{ forloop.counetr }} by something like this in your template:
{{ page_obj.number|add:-1|mul:page_obj.paginator.per_page|add:forloop.counter }}
where:
page_obj.number – page number
page_obj.paginator.per_page – number of items on page
👤Oleg
Source:stackexchange.com