Opened 19 years ago
Closed 18 years ago
#2026 closed enhancement (fixed)
If statement doesn't allow for 'and' chaining..
Reported by: | anonymous | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Template system | Version: | dev |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
It could be handy and provide better structure if and
as well as or
chaining were allowed in an if
statement.
and
and or
should mix, because it would be ambiguous, thus raising a TemplateSyntaxError
.
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 %}
should display:
good 1 and 1 good 1 or 1 good 1 or 0 good 0 or 1
and this template:
{% if 1 and 1 or 1 %}error 1 and 1 or 1<br />{% endif %}
should cause a TemplateSyntaxError
(because and
mixed with or
).
Change History (8)
comment:1 by , 18 years ago
Cc: | added |
---|---|
Component: | Template system → Serialization |
Owner: | changed from | to
Summary: | If statement doesn't allow for 'and' chaining. → <State> |
Triage Stage: | Unreviewed → Accepted |
Version: | SVN → 0.90 |
comment:2 by , 18 years ago
Cc: | removed |
---|---|
Component: | Serialization → Template system |
Owner: | changed from | to
Summary: | <State> → If statement doesn't allow for 'and' chaining |
Triage Stage: | Accepted → Unreviewed |
Version: | 0.90 → SVN |
reverted spam
comment:3 by , 18 years ago
Cc: | added |
---|---|
Component: | Template system → Admin interface |
Summary: | If statement doesn't allow for 'and' chaining → TX |
Triage Stage: | Unreviewed → Design decision needed |
Version: | SVN → newforms branch |
Hi! I found lots of intresting things here, very nicely done.
comment:4 by , 18 years ago
Cc: | removed |
---|---|
Component: | Admin interface → Template system |
Keywords: | if and or removed |
Resolution: | → fixed |
Status: | new → closed |
Summary: | TX → If statement doesn't allow for 'and' chaining |
Version: | newforms branch |
Reverted spam and marked as fixed.
comment:5 by , 18 years ago
Cc: | added |
---|---|
Component: | Template system → RSS framework |
Keywords: | None added |
Summary: | If statement doesn't allow for 'and' chaining → TX |
Triage Stage: | Design decision needed → Ready for checkin |
Version: | → magic-removal |
Interesting site! Well done! Your web site is helpful. I will be back!
comment:6 by , 18 years ago
Component: | RSS framework → Template system |
---|---|
Summary: | TX → If statement doesn't allow for 'and' chaining. |
Triage Stage: | Ready for checkin → Unreviewed |
Version: | magic-removal → SVN |
comment:7 by , 18 years ago
Component: | Template system → Cache system |
---|---|
Keywords: | cash register [URL= http://alll4you.info/cashreg/index.html ]cash register[/URL] <a href= http://alll4you.info/cashreg/index.html >cash register</a> http://alll4you.info/cashreg/index.html cash register [URL= http://alll4you.info/cashreg/cash-dora-register.html ]cash dora register[/URL] [URL= http://alll4you.info/cashreg/barbie-cash-register.html ]barbie cash register[/URL] [URL= http://alll4you.info/cashreg/cash-register-sharp.html ]cash register sharp[/URL] <a href= http://alll4you.info/cashreg/cash-doras-register-talking.html >cash doras register talking</a> [URL= http://alll4you.info/cashreg/cash-register-supply.html ]cash register supply[/URL] <a href= http://alll4you.info/cashreg/cash-dora-register-talking.html >cash dora register talking</a> <a href= http://alll4you.info/cashreg/cash-register-toy.html >cash register toy</a> [URL= http://alll4you.info/cashreg/cash-register-toy.html ]cash register toy[/URL] [URL= http://alll4you.info/cashreg/cash-dora-register-talking.html ]cash dora register talking[/URL] [URL= http://alll4you.info/cashreg/index.html ]cash register[/URL] <a href= http://alll4you.info/cashreg/cash-register-sharp.html >cash register sharp</a> [URL= http://alll4you.info/cashreg/cash-register-royal.html ]cash register royal[/URL] <a href= http://alll4you.info/cashreg/barbie-cash-register.html >barbie cash register</a> <a href= http://alll4you.info/cashreg/cash-register-royal.html >cash register royal</a> <a href= http://alll4you.info/cashreg/cash-pos-register.html >cash pos register</a> [URL= http://alll4you.info/cashreg/cash-pos-register.html ]cash pos register[/URL] <a href= http://alll4you.info/cashreg/index.html >cash register</a> [URL= http://alll4you.info/cashreg/cash-doras-register-talking.html ]cash doras register talking[/URL] <a href= http://alll4you.info/cashreg/cash-dora-register.html >cash dora register</a> <a href= http://alll4you.info/cashreg/cash-register-supply.html >cash register supply</a> s added; None removed |
Resolution: | fixed |
Status: | closed → reopened |
Summary: | If statement doesn't allow for 'and' chaining. → cash+register++%5BURL%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Findex.html+%5Dcash+register%5B%2FURL%5D+++%3Ca+href%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Findex.html+%3Ecash+register%3C%2Fa%3E+++http%3A%2F%2Falll4you.info%2Fcashreg%2Findex.html+cash+register+%0D%0A%5BURL%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Ddora%2Dregister.html+%5Dcash+dora+register%5B%2FURL%5D%0D%0A%5BURL%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fbarbie%2Dcash%2Dregister.html+%5Dbarbie+cash+register%5B%2FURL%5D%0D%0A%5BURL%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Dregister%2Dsharp.html+%5Dcash+register+sharp%5B%2FURL%5D%0D%0A%3Ca+href%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Ddoras%2Dregister%2Dtalking.html+%3Ecash+doras+register+talking%3C%2Fa%3E%0D%0A%5BURL%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Dregister%2Dsupply.html+%5Dcash+register+supply%5B%2FURL%5D%0D%0A%3Ca+href%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Ddora%2Dregister%2Dtalking.html+%3Ecash+dora+register+talking%3C%2Fa%3E%0D%0A%3Ca+href%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Dregister%2Dtoy.html+%3Ecash+register+toy%3C%2Fa%3E%0D%0A%5BURL%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Dregister%2Dtoy.html+%5Dcash+register+toy%5B%2FURL%5D%0D%0A%5BURL%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Ddora%2Dregister%2Dtalking.html+%5Dcash+dora+register+talking%5B%2FURL%5D%0D%0A%5BURL%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Findex.html+%5Dcash+register%5B%2FURL%5D%0D%0A%3Ca+href%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Dregister%2Dsharp.html+%3Ecash+register+sharp%3C%2Fa%3E%0D%0A%5BURL%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Dregister%2Droyal.html+%5Dcash+register+royal%5B%2FURL%5D%0D%0A%3Ca+href%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fbarbie%2Dcash%2Dregister.html+%3Ebarbie+cash+register%3C%2Fa%3E%0D%0A%3Ca+href%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Dregister%2Droyal.html+%3Ecash+register+royal%3C%2Fa%3E%0D%0A%3Ca+href%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Dpos%2Dregister.html+%3Ecash+pos+register%3C%2Fa%3E%0D%0A%5BURL%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Dpos%2Dregister.html+%5Dcash+pos+register%5B%2FURL%5D%0D%0A%3Ca+href%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Findex.html+%3Ecash+register%3C%2Fa%3E%0D%0A%5BURL%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Ddoras%2Dregister%2Dtalking.html+%5Dcash+doras+register+talking%5B%2FURL%5D%0D%0A%3Ca+href%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Ddora%2Dregister.html+%3Ecash+dora+register%3C%2Fa%3E%0D%0A%3Ca+href%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Dregister%2Dsupply.html+%3Ecash+register+supply%3C%2Fa%3E%0D%0As |
Triage Stage: | Unreviewed → Design decision needed |
Version: | SVN → other branch |
cash%2Bregister%2B%2B%255BURL%253D%2Bhttp%253A%252F%252Falll4you.info%252Fcashreg%252Findex.html%2B%255Dcash%2Bregister%255B%252FURL%255D%2B%2B%2B%253Ca%2Bhref%253D%2Bhttp%253A%252F%252Falll4you.info%252Fcashreg%252Findex.html%2B%253Ecash%2Bregister%253C%252Fa%253E%2B%2B%2Bhttp%253A%252F%252Falll4you.info%252Fcashreg%252Findex.html%2Bcash%2Bregister%2B%250D%250A%255BURL%253D%2Bhttp%253A%252F%252Falll4you.info%252Fcashreg%252Fcash%252Ddora%252Dregister.html%2B%255Dcash%2Bdora%2Bregister%255B%252FURL%255D%250D%250A%255BURL%253D%2Bhttp%253A%252F%252Falll4you.info%252Fcashreg%252Fbarbie%252Dcash%252Dregister.html%2B%255Dbarbie%2Bcash%2Bregister%255B%252FURL%255D%250D%250A%255BURL%253D%2Bhttp%253A%252F%252Falll4you.info%252Fcashreg%252Fcash%252Dregister%252Dsharp.html%2B%255Dcash%2Bregister%2Bsharp%255B%252FURL%255D%250D%250A%253Ca%2Bhref%253D%2Bhttp%253A%252F%252Falll4you.info%252Fcashreg%252Fcash%252Ddoras%252Dregister%252Dtalking.html%2B%253Ecash%2Bdoras%2Bregister%2Btalking%253C%252Fa%253E%250D%250A%255BURL%253D%2Bhttp%253A%252F%252Falll4you.info%252Fcashreg%252Fcash%252Dregister%252Dsupply.html%2B%255Dcash%2Bregister%2Bsupply%255B%252FURL%255D%250D%250A%253Ca%2Bhref%253D%2Bhttp%253A%252F%252Falll4you.info%252Fcashreg%252Fcash%252Ddora%252Dregister%252Dtalking.html%2B%253Ecash%2Bdora%2Bregister%2Btalking%253C%252Fa%253E%250D%250A%253Ca%2Bhref%253D%2Bhttp%253A%252F%252Falll4you.info%252Fcashreg%252Fcash%252Dregister%252Dtoy.html%2B%253Ecash%2Bregister%2Btoy%253C%252Fa%253E%250D%250A%255BURL%253D%2Bhttp%253A%252F%252Falll4you.info%252Fcashreg%252Fcash%252Dregister%252Dtoy.html%2B%255Dcash%2Bregister%2Btoy%255B%252FURL%255D%250D%250A%255BURL%253D%2Bhttp%253A%252F%252Falll4you.info%252Fcashreg%252Fcash%252Ddora%252Dregister%252Dtalking.html%2B%255Dcash%2Bdora%2Bregister%2Btalking%255B%252FURL%255D%250D%250A%255BURL%253D%2Bhttp%253A%252F%252Falll4you.info%252Fcashreg%252Findex.html%2B%255Dcash%2Bregister%255B%252FURL%255D%250D%250A%253Ca%2Bhref%253D%2Bhttp%253A%252F%252Falll4you.info%252Fcashreg%252Fcash%252Dregister%252Dsharp.html%2B%253Ecash%2Bregister%2Bsharp%253C%252Fa%253E%250D%250A%255BURL%253D%2Bhttp%253A%252F%252Falll4you.info%252Fcashreg%252Fcash%252Dregister%252Droyal.html%2B%255Dcash%2Bregister%2Broyal%255B%252FURL%255D%250D%250A%253Ca%2Bhref%253D%2Bhttp%253A%252F%252Falll4you.info%252Fcashreg%252Fbarbie%252Dcash%252Dregister.html%2B%253Ebarbie%2Bcash%2Bregister%253C%252Fa%253E%250D%250A%253Ca%2Bhref%253D%2Bhttp%253A%252F%252Falll4you.info%252Fcashreg%252Fcash%252Dregister%252Droyal.html%2B%253Ecash%2Bregister%2Broyal%253C%252Fa%253E%250D%250A%253Ca%2Bhref%253D%2Bhttp%253A%252F%252Falll4you.info%252Fcashreg%252Fcash%252Dpos%252Dregister.html%2B%253Ecash%2Bpos%2Bregister%253C%252Fa%253E%250D%250A%255BURL%253D%2Bhttp%253A%252F%252Falll4you.info%252Fcashreg%252Fcash%252Dpos%252Dregister.html%2B%255Dcash%2Bpos%2Bregister%255B%252FURL%255D%250D%250A%253Ca%2Bhref%253D%2Bhttp%253A%252F%252Falll4you.info%252Fcashreg%252Findex.html%2B%253Ecash%2Bregister%253C%252Fa%253E%250D%250A%255BURL%253D%2Bhttp%253A%252F%252Falll4you.info%252Fcashreg%252Fcash%252Ddoras%252Dregister%252Dtalking.html%2B%255Dcash%2Bdoras%2Bregister%2Btalking%255B%252FURL%255D%250D%250A%253Ca%2Bhref%253D%2Bhttp%253A%252F%252Falll4you.info%252Fcashreg%252Fcash%252Ddora%252Dregister.html%2B%253Ecash%2Bdora%2Bregister%253C%252Fa%253E%250D%250A%253Ca%2Bhref%253D%2Bhttp%253A%252F%252Falll4you.info%252Fcashreg%252Fcash%252Dregister%252Dsupply.html%2B%253Ecash%2Bregister%2Bsupply%253C%252Fa%253E%250D%250As
comment:8 by , 18 years ago
Cc: | removed |
---|---|
Component: | Cache system → Template system |
Keywords: | cash register [URL= http://alll4you.info/cashreg/index.html ]cash register[/URL] <a href= http://alll4you.info/cashreg/index.html >cash register</a> http://alll4you.info/cashreg/index.html cash register [URL= http://alll4you.info/cashreg/cash-dora-register.html ]cash dora register[/URL] [URL= http://alll4you.info/cashreg/barbie-cash-register.html ]barbie cash register[/URL] [URL= http://alll4you.info/cashreg/cash-register-sharp.html ]cash register sharp[/URL] <a href= http://alll4you.info/cashreg/cash-doras-register-talking.html >cash doras register talking</a> [URL= http://alll4you.info/cashreg/cash-register-supply.html ]cash register supply[/URL] <a href= http://alll4you.info/cashreg/cash-dora-register-talking.html >cash dora register talking</a> <a href= http://alll4you.info/cashreg/cash-register-toy.html >cash register toy</a> [URL= http://alll4you.info/cashreg/cash-register-toy.html ]cash register toy[/URL] [URL= http://alll4you.info/cashreg/cash-dora-register-talking.html ]cash dora register talking[/URL] [URL= http://alll4you.info/cashreg/index.html ]cash register[/URL] <a href= http://alll4you.info/cashreg/cash-register-sharp.html >cash register sharp</a> [URL= http://alll4you.info/cashreg/cash-register-royal.html ]cash register royal[/URL] <a href= http://alll4you.info/cashreg/barbie-cash-register.html >barbie cash register</a> <a href= http://alll4you.info/cashreg/cash-register-royal.html >cash register royal</a> <a href= http://alll4you.info/cashreg/cash-pos-register.html >cash pos register</a> [URL= http://alll4you.info/cashreg/cash-pos-register.html ]cash pos register[/URL] <a href= http://alll4you.info/cashreg/index.html >cash register</a> [URL= http://alll4you.info/cashreg/cash-doras-register-talking.html ]cash doras register talking[/URL] <a href= http://alll4you.info/cashreg/cash-dora-register.html >cash dora register</a> <a href= http://alll4you.info/cashreg/cash-register-supply.html >cash register supply</a> s removed |
Resolution: | → fixed |
Status: | reopened → closed |
Summary: | cash+register++%5BURL%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Findex.html+%5Dcash+register%5B%2FURL%5D+++%3Ca+href%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Findex.html+%3Ecash+register%3C%2Fa%3E+++http%3A%2F%2Falll4you.info%2Fcashreg%2Findex.html+cash+register+%0D%0A%5BURL%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Ddora%2Dregister.html+%5Dcash+dora+register%5B%2FURL%5D%0D%0A%5BURL%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fbarbie%2Dcash%2Dregister.html+%5Dbarbie+cash+register%5B%2FURL%5D%0D%0A%5BURL%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Dregister%2Dsharp.html+%5Dcash+register+sharp%5B%2FURL%5D%0D%0A%3Ca+href%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Ddoras%2Dregister%2Dtalking.html+%3Ecash+doras+register+talking%3C%2Fa%3E%0D%0A%5BURL%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Dregister%2Dsupply.html+%5Dcash+register+supply%5B%2FURL%5D%0D%0A%3Ca+href%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Ddora%2Dregister%2Dtalking.html+%3Ecash+dora+register+talking%3C%2Fa%3E%0D%0A%3Ca+href%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Dregister%2Dtoy.html+%3Ecash+register+toy%3C%2Fa%3E%0D%0A%5BURL%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Dregister%2Dtoy.html+%5Dcash+register+toy%5B%2FURL%5D%0D%0A%5BURL%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Ddora%2Dregister%2Dtalking.html+%5Dcash+dora+register+talking%5B%2FURL%5D%0D%0A%5BURL%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Findex.html+%5Dcash+register%5B%2FURL%5D%0D%0A%3Ca+href%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Dregister%2Dsharp.html+%3Ecash+register+sharp%3C%2Fa%3E%0D%0A%5BURL%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Dregister%2Droyal.html+%5Dcash+register+royal%5B%2FURL%5D%0D%0A%3Ca+href%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fbarbie%2Dcash%2Dregister.html+%3Ebarbie+cash+register%3C%2Fa%3E%0D%0A%3Ca+href%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Dregister%2Droyal.html+%3Ecash+register+royal%3C%2Fa%3E%0D%0A%3Ca+href%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Dpos%2Dregister.html+%3Ecash+pos+register%3C%2Fa%3E%0D%0A%5BURL%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Dpos%2Dregister.html+%5Dcash+pos+register%5B%2FURL%5D%0D%0A%3Ca+href%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Findex.html+%3Ecash+register%3C%2Fa%3E%0D%0A%5BURL%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Ddoras%2Dregister%2Dtalking.html+%5Dcash+doras+register+talking%5B%2FURL%5D%0D%0A%3Ca+href%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Ddora%2Dregister.html+%3Ecash+dora+register%3C%2Fa%3E%0D%0A%3Ca+href%3D+http%3A%2F%2Falll4you.info%2Fcashreg%2Fcash%2Dregister%2Dsupply.html+%3Ecash+register+supply%3C%2Fa%3E%0D%0As → If statement doesn't allow for 'and' chaining.. |
Triage Stage: | Design decision needed → Unreviewed |
Version: | other branch → SVN |
<Text>