The function in the controller returns either the page content directly as a string (no view is used) or a dictionary with the key:value pairs to be used in the corresponding view.
Usually each function in a controller returns only a bunch of variables, far from a gazillion. > def index(): > return dict(quote1="this is quote1", quote2="this is quote2") > > # CANT DO THIS > # def index(): > # return dict(quote1="this is quote1") > # return dict(quote2="this is quote2") In Python (and all languages I know) a function ends when it executes a return statement, the second return is never executed, so all variables to be returned must be inside the same return. On Mar 8, 3:38 pm, Jamboo <[email protected]> wrote: > Hello, > > Based off the web2py book in the start, I was getting the idea that > the controller would store the strings versus writing them directly > into the view. From my understanding you can do that and have a mix > in the view but what is the best practice for this? This is what I > have started with. I am guessing its not normal/good idea to have 1 > dictionary with a gazillion strings?http://www.pastie.org/1648453 > Thanks!

