In a controller I got functions that use the same variables. I want to assign a value to them outside any function:
if request.args(0) == 'openinghours': rdrctUrl = URL('opening_hours') function_header = 'Opening hours' function_icon = 'fa-clock-o' table = db.cal_opening_hours elif request.args(0) == 'eventlist': rdrctUrl = URL('event_list') function_header = 'Event list' function_icon = 'fa-calendar-o' table = db.cal_event_list def insert(): .... return locals() def update(): .... return locals() def opening_hours(): .... return locals() etc. The variables rdrctUrl en table are available in the functions, however, function_header and function_icon which I need in views are not available in the views. Where do I store them to make them available in the views. Kind regards, Annet -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.