you're two or more steps ahead than your brain .... def display_form():
in a controller named "thecontroller.py" will work ok as long as in a view views/thecontroller/display_form.html there's a {{=form}} written inside. If you want to copy/paste examples in the book at least read the previous chapters .... http://web2py.com/books/default/chapter/29/04#Dispatching will help you o understand a lot of things. On Friday, January 18, 2013 5:54:46 PM UTC+1, Alex Glaros wrote: > > I (1) created the "person" table in models, (2) typed in the function > displayed in my original post in the controller, then (3) inserted > {{=form}} in /views/default/index.html but receive this error: > > <type 'exceptions.NameError'> name 'form' is not defined > I'm just trying to make the example in the documentation work so that the > person table works/appears on the html view. > > thanks, > > Alex > > On Friday, January 18, 2013 7:01:29 AM UTC-8, DenesL wrote: >> >> >> Hi Alex, >> >> it is exactly that form, the one returned in the dictionary by the >> display_form function. >> >> There is nothing wrong with other functions returning the same variable >> unless you use them in the same view. >> Normally each function has its own view. >> >> Denes >> > --