Thank you Fran, it's a bit more abstract than I can understand: does it mean that if I have many methods in my Klaas I need to make a number of such wrappers for each method? Obviously I wanted to store custom class in session because I needed to access class methods. Namely, I use session to store a number of filters for db select: you can add filter e.g. 'by name' and application would append new Filter object to array stored in session; later this Filter object can be used to generate HTML form snippets to edit filter values and SQL snippets to add to sql query. Thus we have at least a constructor and two methods (getSQL and getHTML).
On Mar 9, 10:49 am, Fran <francisb...@googlemail.com> wrote: > On Mar 9, 7:12 am, SergeyPo <ser...@zarealye.com> wrote: > > > session.something = Klaas() > > #this will be stored in session and in session file you will see > > correct pickle representation of the object (NB!) > > However, later in other calls this session won't be restored and > > silently updated with new one. > > Place this in your model to have your class always accessible: > > def myapp_sessions(f): > session.something = Klaas() > return f() > response._caller=lambda f: myapp_sessions(f) > > F --~--~---------~--~----~------------~-------~--~----~ 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 web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---