Controller functions can return:
return "Hello"
and this would be the body of the returned pagereturn dict(message="Hello")
and this would be passed to a viewreturn response.stream(open('filename','rb'))
to return a large fileOften you just return a dictionary containing a definition of those variables you want to pass to the view. By default a function() in controller.py will be rendered by a view called controller/function.html. If this view is not found the generic.html view renders the variables in the dictionary. A controller function can also return a string. In this case the view is not executed and the string is returned instead.