[web2py] Re: conditional statement in view doesn't prevent "not defined" error

2016-02-05 Thread Alex Glaros
good catch Anthony, you're right, var was accidentally set to True thanks Alex -- 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

[web2py] Re: conditional statement in view doesn't prevent "not defined" error

2016-02-04 Thread Anthony
Please check the value of does_user_have_admin_roles -- it must be True when you think it isn't. Anyway, an alternative is: {{if 'admin_roles' in globals():}} Even better, just initialize admin_roles to an empty list and do: {{for r in admin_roles:}} The loop will not be executed if the list