Re: Outputing an integer value in a template, but with some calculation done on it

2009-09-04 Thread Matias
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

Re: Outputing an integer value in a template, but with some calculation done on it

2009-09-03 Thread Tim Chase
> 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

Outputing an integer value in a template, but with some calculation done on it

2009-09-03 Thread Neeraj
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