On Sunday, 2 June 2013 17:15:55 UTC-5, lesssugar wrote: > OK, this might be a silly one. > > My app uses one main view (layout.html), which is extended by every other > one. > layout.html has a login form included, created in default.py controller > (the form is supposed to be at hand until user signs in). > > Now, whenever I use any other controller, I get an error saying that name > "login_form" is not defined. > Example: I'm on default/index page (the login form's included). I click on > a link to go to [other controller]/index (which of course extends > layout.html). The page throws the mentioned error. > > Do all the functions in controllers other than default.py need to return > "login_form" to get it working? >
Yes. web2py is a push framework, like Rails and Django, not a pull framework. You have the option of defining the login form in a model (nor recommended) or handle the login form via ajax. > I believe not but I'm not sure how to do it properly. > > -- --- 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/groups/opt_out.