0
votes

I use {% if user in users %} in template, but get this error:

TemplateSyntaxError: 'if' statement improperly formatted

Does Django template have no IN operator on Google Appengine? Is there a way to achieve like this?

2

2 Answers

3
votes

The in operator is definitely present in Django templates 1.2, but it probably isn't available in the much less powerful 0.96 templates, which is the default in the current version of the AppEngine SDK. It is fairly simple to switch to 1.2. The instruction are in the AppEngine Docs.

0
votes

Did you set up Django on appengine? The app engine sdk version is fairly old. Make sure you have Django 1.2 or higher installed or the smart if template tag[1] installed for lower versions.

1: http://djangosnippets.org/snippets/1350/