wait.... yes, a functions can return multiple objects in a tuple
no, a controller action should not do that. an action returns a string (the web page) or a dictionary (defining the symbols exposed to the view). Massimo On Nov 21, 8:47 am, kaj <[EMAIL PROTECTED]> wrote: > Hi - and thanks for your reply; > > Yes, I realized this is a python issue, and found my python manual > telling me that I could combine several dicts in the return statement > by making a tuple out of them, just listing them one by one, separated > by a comma. > > Regards, > Kaj R. > > On Nov 21, 3:18 am, "mr.freeze" <[EMAIL PROTECTED]> wrote: > > > As far as I know, you return one dictionary to the view with as many > > key/value pairs as you want. Typically something like: > > > def two_forms(): > > myvariable='web2py rocks' > > form1=SQLFORM(db.person) > > form2=SQLFORM(db.place) > > if form1.accepts(request.vars,session): > > response.flash='form one accepted' > > if form2.accepts(request.vars,session): > > response.flash='form two accepted' > > return dict(form1=form1,form2=form2,myvariable=myvariable) > > > Check out this presentation for a lot of good > > info:http://mdp.cti.depaul.edu/examples/static/pyworks.pdf > > > Then buy the manual from here:http://www.lulu.com/content/4968879 > > > On Nov 20, 6:51 pm, kaj <[EMAIL PROTECTED]> wrote: > > > > Hi all; > > > > I'm new to web2py, and find it fascinating. > > > > Now I want to return a bunch of data to the view, from 5 different > > > tables. > > > > Do I have to pack all the data into one dict, or is it possible to use > > > several dicts? > > > > From the documentation it seems to me that only one dict gets passed > > > to the view, right? > > > > Thanks, > > > Kaj R. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---