You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py-users
Hi.
I am using sessions and Ajax (via web2py's LOAD), and finding that in the main view's code I can call the session as normal, but in the code for the component the session is not accessible and the error messages suggest that it's a local variable: -
UnboundLocalError: local variable 'session' referenced before assignment
How should I address sessions differently under Ajax?
--
Cheers,
PhilK
Ruslan Gareev
unread,
Oct 25, 2019, 1:29:44 PM10/25/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py-users
In models:
current.session = session
In your component:
from gluon import current def your_function(): session = current.session
пятница, 25 октября 2019 г., 16:34:49 UTC+5 пользователь Philip Kilner написал: