views:

161

answers:

0

I'm using django-pagination to paginate lists for my Django site. At the top of my template, I'm using

{% autopaginate projects 10 %}

I want to display something like 'Showing 1 - 10 of 52 results'. I know it's easiest to do this with the page objects created by the template tag. The problem is that I don't know how to access it in the template context.

I tried to look through the source, and it looks like the tag loads it into 'page_obj' as you can see here, but I couldn't get it to work.

Showing <span>{{ page_obj.start_index }}</span> - <span>{{ page_obj.end_index }}</span> of <span>{{ projects.count }}</span> results

only displays: Showing - of 5 results