I have implemented `and` for if statements.

`and` and `or` cannot mix (because it would be ambiguous)

In this template:
{% if 1 and 1 %}good 1 and 1<br />{% endif %}
{% if 1 and 0 %}bad 1 and 0<br />{% endif %}
{% if 0 and 1 %}bad 0 and 1<br />{% endif %}
{% if 0 and 0 %}bad 0 and 0<br />{% endif %}
{% if 1 or 1 %}good 1 or 1<br />{% endif %}
{% if 1 or 0 %}good 1 or 0<br />{% endif %}
{% if 0 or 1 %}good 0 or 1<br />{% endif %}
{% if 0 or 0 %}bad 0 or 0<br />{% endif %}
{% if 1 and 1 or 1 %}error 1 and 1 or 1<br />{% endif %}

all the 'good' lines would print, all the 'bad' lines would not print,
and the 'error' line would cause a TemplateSyntaxError (because and
mixed with or).

http://django.pastebin.com/740106


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" 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-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to