[web2py] Re: conditionally include in view

2011-03-10 Thread Massimo Di Pierro
correct On Mar 9, 5:14 pm, ron_m wrote: > I use this in a portion of the views coded for what I am working on and it > works for me. I just ran the page with the test true and again with the test > false and I get the include file content inside the {{if condition:}} branch > if the condition is

[web2py] Re: conditionally include in view

2011-03-09 Thread ron_m
I use this in a portion of the views coded for what I am working on and it works for me. I just ran the page with the test true and again with the test false and I get the include file content inside the {{if condition:}} branch if the condition is True and the html in the {{else:} branch if the

[web2py] Re: conditionally include in view

2011-03-09 Thread Massimo Di Pierro
Include is executed whether or not the condition is true. It is not python code therefore it is executed before the python code is executed. It is not a good idea to put the include in a condition. On Mar 9, 12:24 pm, m t wrote: > Hi, > > I have such code: > {{if someData:}} >      {{include 'add