Opened 9 years ago

Closed 8 years ago

#2026 closed enhancement (fixed)

If statement doesn't allow for 'and' chaining..

Reported by: anonymous Owned by: adrian
Component: Template system Version: master
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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 Changed 9 years ago by <Name>

  • Cc <Default> added
  • Component changed from Template system to Serialization
  • Owner changed from adrian to jacob
  • Summary changed from If statement doesn't allow for 'and' chaining. to <State>
  • Triage Stage changed from Unreviewed to Accepted
  • Version changed from SVN to 0.90

<Text>

comment:2 Changed 9 years ago by Gary Wilson <gary.wilson@…>

  • Cc <Default> removed
  • Component changed from Serialization to Template system
  • Owner changed from jacob to adrian
  • Summary changed from <State> to If statement doesn't allow for 'and' chaining
  • Triage Stage changed from Accepted to Unreviewed
  • Version changed from 0.90 to SVN

reverted spam

comment:3 Changed 9 years ago by neoz

  • Cc None added
  • Component changed from Template system to Admin interface
  • Summary changed from If statement doesn't allow for 'and' chaining to TX
  • Triage Stage changed from Unreviewed to Design decision needed
  • Version changed from SVN to newforms branch

Hi! I found lots of intresting things here, very nicely done.

comment:4 Changed 9 years ago by adrian

  • Cc None removed
  • Component changed from Admin interface to Template system
  • Keywords if and or removed
  • Resolution set to fixed
  • Status changed from new to closed
  • Summary changed from TX to If statement doesn't allow for 'and' chaining
  • Version newforms branch deleted

Reverted spam and marked as fixed.

comment:5 Changed 9 years ago by lacerisesucree

  • Cc None added
  • Component changed from Template system to RSS framework
  • Keywords None added
  • Summary changed from If statement doesn't allow for 'and' chaining to TX
  • Triage Stage changed from Design decision needed to Ready for checkin
  • Version set to magic-removal

Interesting site! Well done! Your web site is helpful. I will be back!

comment:6 Changed 9 years ago by ubernostrum

  • Component changed from RSS framework to Template system
  • Summary changed from TX to If statement doesn't allow for 'and' chaining.
  • Triage Stage changed from Ready for checkin to Unreviewed
  • Version changed from magic-removal to SVN

comment:7 Changed 8 years ago by ophnt

  • Component changed from Template system to 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 deleted
  • Status changed from closed to reopened
  • Summary changed from If statement doesn't allow for 'and' chaining. to 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 changed from Unreviewed to Design decision needed
  • Version changed from SVN to 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 Changed 8 years ago by Simon G. <dev@…>

  • Cc None removed
  • Component changed from Cache system to 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 set to fixed
  • Status changed from reopened to closed
  • Summary changed from 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 to If statement doesn't allow for 'and' chaining..
  • Triage Stage changed from Design decision needed to Unreviewed
  • Version changed from other branch to SVN
Note: See TracTickets for help on using tickets.
Back to Top