my model has the following for T2: from applications.plugin_t2.modules.t2 import T2 t2=T2(request,response,session,cache,T,db)
session.t2_person_id prints "NONE" am I missing something? Here is my code logic: check if username & password are correct. if they are, then set t2.logged_in = True and redirect to userhome. However, once at userhome.html {{=session.t2_person_id}} prints "NONE". I think I need an explination of how to use T2 without the helpers for the login form and such. What variables do I need to ensure I store data in to use T2's features? Thanks for the quick reply! On Apr 7, 2:00 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > try {{=session}} to see what is going on > > Is it possible you create the t2 object in the controller and not in > the model? > > I think there is also a variable session.t2_person_id that you can > use for the check. > > Massimo > > On Apr 7, 3:50 pm, waTR <roman.goldm...@gmail.com> wrote: > > > I am using the t2.logged_in variable to store the status of my user. > > > When the user logs in, the function changes the t2.logged_in = True. > > > However, when I then check t2.logged_in in another controller and > > another page, t2.logged_in = False. Whats going on? It seems > > t2.logged_in is not keeping track of the session or something... is > > there a way to pass a session to it? > > > How do I do this? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---