On Friday, February 19, 2016 at 10:13:31 AM UTC-8, Pierre wrote:
>
> hi everyone,
>
> I have a controller/function with different return cases:
> like :
>
> if condition1:
>     return dict(var1=var1)
> elif condition2:
>     return dict(var1=var1,var2=var2)
> .....
>
> how do I know in the corresponding view which variables are accessible 
> (what's the case) ? do I have to return a case variable ?
>


Something like

{{ =var1 }}
{{ if 'var2' in globals():}} 
  {{ =var2 }}
{{ pass }}




/dps

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to