As Anthony says, initialize all your varibles using a 'falsey' value, e.g.
def myfunction():
myvar1 = ''
myvar2 = ''
if conditon1:
myvar1 = get_data_from_db()
if conditon2:
myvar2 = get_data_from_somewhere_else()
return dict(myvar1=myvar1, myvar2=myvar2)
In that way you will always have all the variables available. If blank,
they print as empty strings. You can always test for none-empty values
with {{if myvar1:}} etc.
--
---
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/groups/opt_out.