Just out of curiosity, is there a reason why the templating constructs
can't evaluate arbitrary expressions? It seems terribly awkward to me
that {% if %} can only evaluate variable names, while you need the
separate operator {% ifequals %} to test for equality, and for some
reason it doesn't support {% else %}.
I had a very simple use case where I wanted to do something like:
{% if a == 1}blah{% else %}foo{% endif %}
and the closest I can get is:
{% ifequal a 1 %}blah{% endifequal %}{% ifnotequal a 1 %}foo{%
endifnotequal %}
Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---