Models in web2py are defined as "code that must be executed to create the environment for controllers". meny.py is there because it was simple but you can move the code into a controller if you like.
Anything defined in models is exposed to both controllers and views. On Jul 11, 10:15 am, Cliff <[email protected]> wrote: > I have the basic functionality working for my port from PHP, and now > it's time to start working on look and feel issues. > > I have two simple questions about menu.py to which I have not been > able to find answers this morning: > > 1. Why is it in the models directory? > 2. How does menu.py get included so that response.menu is available > to the MENU call in layout.html? > > I think I can use menu.py without knowing the answers, but I always > like to understand the magic. > > Thanks, > Cliff Kachinske

