On Oct 7, 9:58 pm, "portly.shor...@googlemail.com" <portly.shor...@googlemail.com> wrote: > Many thanks for such a quick answer. A second question (if I may). I > have a second query that returns a single row - how would I store that > in the session as trying as_list gives me an error: > > KeyError: 'as_list'. > > many thanks (again). > > p.s I've bought the PDF of the second version of the book but could > not find it in there. > > cheers > > Portly > > On Oct 7, 7:42 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > > if > > > rows=db().select(...) > > > you cannot store rows in a session because it includes an open db > > connection. > > You can store > > > rows.as_list() > > > On Oct 7, 1:35 pm, "portly.shor...@googlemail.com" > > > <portly.shor...@googlemail.com> wrote: > > > Hi - I am new to Web2py and think it is great but I'm stuck. Is there > > > a limit on what i can store in the Session? I want to store the the > > > results of a sql query (returning 40 records) in the session. When I > > > try I get an exception: > > > > Traceback (most recent call last): > > > File "gluon/main.py", line 419, in wsgibase > > > File "gluon/globals.py", line 368, in _try_store_on_disk > > > File "copy_reg.pyc", line 73, in _reduce_ex > > > File "gluon/sql.py", line 537, in __getattr__ > > > KeyError: '__getstate__' > > > > any ideas? > > > > many thanks > > > > Portly --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---
[web2py:32426] Re: Newbie Question: Storing things in the the Session
portly.shor...@googlemail.com Wed, 07 Oct 2009 14:00:55 -0700
- [web2py:32415] Newbie Question: Storing thin... portly.shor...@googlemail.com
- [web2py:32416] Re: Newbie Question: Sto... mdipierro
- [web2py:32425] Re: Newbie Question:... portly.shor...@googlemail.com
- [web2py:32426] Re: Newbie Quest... portly.shor...@googlemail.com
- [web2py:32428] Re: Newbie Quest... mdipierro
- [web2py:32431] Re: Newbie Q... portly.shor...@googlemail.com
- [web2py:32436] Re: New... mdipierro
- [web2py:32455] Re:... portly.shor...@googlemail.com