If you're using Pagination
http://docs.djangoproject.com/en/dev/topics/pagination/ you can get the
previous and next pages like this:
{{ current_page.previous_page_number }}
If not, check it out. It's a simple way to manage pagination issues.
HTH,
Matias.
On Thu, Sep 3, 2009 at 8:25 PM, Tim Chas
> I am trying to output a variable page_no to a template, but I want to output
> page_no + 1 and page_no - 1. How do I do that? I tried to do something like
> {{ page_no + 1 }} and that failed. Tried {% and %} as well, but no success.
>
> Surely there is a way to do this other than having to calc
Hello people.
This may seem like a very simple question, and for that I apologize.
I am trying to output a variable page_no to a template, but I want to output
page_no + 1 and page_no - 1. How do I do that? I tried to do something like
{{ page_no + 1 }} and that failed. Tried {% and %} as well, b
3 matches
Mail list logo