I'm just learning GAE, Python and Django and have a problem with my Django template. I understand the GAE version of Django is 0.96 and so predates a lot of the fancy {% if x == False %} st开发者_Go百科uff.
All I want to do is:
{% if NOT variable.approved %}
This should render if the approved property is False
{% end if %}
The approved property is a db.BooleanProperty(default=False, required=True)
in my DataStore.
Thanks
You can just do {% if not variable.approved %}
. This is explained in, for example, the 1.1 documentation.
Note that you can install Django 1.2 in GAE, if you want.
精彩评论