Is it possible to write to session variables from Web2py modules?

84 views
Skip to first unread message

at

unread,
Jan 21, 2021, 2:01:36 AM1/21/21
to web2py-users
Is it possible to write to session variables from Web2py modules?

黄祥

unread,
Jan 22, 2021, 10:34:29 PM1/22/21
to web2py-users

Is it possible to write to session variables from Web2py modules?

Clemens

unread,
Jan 23, 2021, 4:53:26 AM1/23/21
to web2py-users
Just reference the session in the module by:
session = current.session

Then you can use exactly in the same way as in the controllers.

Best regards
Clemens

at

unread,
Jan 23, 2021, 5:21:47 AM1/23/21
to web2py-users
Thank you Stifan & Clemens for the help!

Best Regards
Reply all
Reply to author
Forward
0 new messages