[Fixed]-The second if block does not work in django template file

1👍

page seems to be a string type here not an integer while all_pages is integer. So you can not compare them.
Also I would suggest to pass your variables as url arguments, instead of your current approach, it will be much cleaner and faster.

Leave a comment