It's supposed to go in layout.html, not the view. But it may work where you have it.
Also, it looks like you have not used the code that I provided for you. What I mean about the routes is that you do not need to edit the routes file for this to work, In fact you dont need the routes file at all. I would suggest deleting your routes file, restarting web2py and then seeing if you can get it to work. The problem with using routes when it is unnecessary is that it can cause unexpected behavior. If you go to /welcome or /MAESTRO/welcome do you see the Web2py "Hello World" page with the web2py logo in the bottom left corner? If so, you can see that it works without you needing to edit anything.