Can I compare a template variable to an integer in Django/App Engine templates?
- by matt b
Using Django templates in Google App Engine (on Python), is it possible to compare a template variable to an integer in an {% if %} block?
views.py:
class MyHandler(webapp.RequestHandler):
def get(self):
foo_list = db.GqlQuery(...)
...
template_values['foos'] = foo_list
template_values['foo_count'] =…