I have a grammar problem.
I have this Tornado statement in my html page:
{% if usrperm > 2 %}
where usrperm is an integer passed from the Tornado handler to the page. I would compare this value and show a div block only if this value is bigger than 2. But this statement didn’t work.
If I print the usrperm variable I have this:
[{‘perm’: 1L}]
So where I mistake? Thank you very much.
Obviously
usrpermis not a interger, but a dictionary. So your check should probably look like this:In general you should provide more details to get better answers. Exceptions details are more helpful than “didn’t work”. And it would also be helpful to see the code which passes the data to tornado.