TemplateSyntaxError: if statement incorrectly formatted
4 answers
To be able to use the == syntax in the {% if %} , you need to use Django 1.2 or higher.
Django 1.2 ships with your GAE SDK, but it loads 0.96 by default.
You can use version 1.2 of django by declaring the version of the third-party library that you want to use with the use_library() function provided by the google.appengine.dist package. Just put this code at the very top of your python file (at least before importing anything from django:
from google.appengine.dist import use_library use_library('django', '1.2') So your template should look good.
+2