> > Putting in return dict() made it work. Thanks. > > What exactly does that do? Where does it get sent to? >
When myfunc() in mycontroller.py returns a dict (even an empty one), that tells web2py to render the view associated with myfunc, which by default will be /views/mycontroller/myfunc.html (if the requested URL has an extension other than "html", then it will look for a view file with the associated extension instead). If the expected view file doesn't exist, web2py will attempt to use /views/generic.html, but only if generic views are enabled (they are disabled by default, except for local requests). If myfunc() returns anything other than a dict, whatever it returns will be sent directly as the HTTP response body without first rendering any view. See http://web2py.com/books/default/chapter/29/4#Workflow. Anthony