[web2py] Re: accessing current.variable from a module

2015-03-13 Thread Anthony
There is a thread per request. An Ajax for submission happens in a separate request from the request for the page that contains the form. If you need to store data that persists between requests, put it in the session (which you can access in a module via current.session). Anthony On Friday, M

[web2py] Re: accessing current.variable from a module

2015-03-13 Thread Gray Kanarek
How would I know? When does the thread change? initialize() is called on page load, parse_command() is called via Ajax form submission on that page. If it's different threads, how do I do this? Lol. On Thursday, March 12, 2015 at 5:17:22 PM UTC-4, Niphlod wrote: > > are you staying in the same

[web2py] Re: accessing current.variable from a module

2015-03-12 Thread Niphlod
are you staying in the same thread while calling BOTH initialize and parse_command() ? On Thursday, March 12, 2015 at 7:46:16 PM UTC+1, Gray Kanarek wrote: > > I'm defining a variable in one of my modules: > > from gluon import * > > > def initialize(): > current.output_buffer = deque(maxlen=