[web2py] Re: How to translate Django+GAE project for deferred.defer in web2py

2011-12-14 Thread Massimo Di Pierro
I do not see this line in the code but I assume you have it toplevel in a module. That is not allowed. The module is executed only once when first imported. If you import it outside the wsgi application the request has not been parsed yet. Even if it were request would always be the first request,

[web2py] Re: How to translate Django+GAE project for deferred.defer in web2py

2011-12-14 Thread Constantine Vasil
I use 'current' in a function in a model like this: = def send_email_message_web2py( reply_to, reply_to_email_addr, sender_organization,

[web2py] Re: How to translate Django+GAE project for deferred.defer in web2py

2011-12-14 Thread howesc
massimo's point about caching of modules probably applies here. i have seen this sort of sometimes behavior before and in my cases was able to link it back to first request on a GAE instance vs later request on an instance. i had this problem with the custom importer (which i patched and is

[web2py] Re: How to translate Django+GAE project for deferred.defer in web2py

2011-12-14 Thread Constantine Vasil
it seems too complicated issue. I tried and made a task handler on an URL and it works well. Got a message that it could be up to 100KB?!?

[web2py] Re: How to translate Django+GAE project for deferred.defer in web2py

2011-12-13 Thread howesc
we are at the edge of my knowledge here, but the things that might be important to you from gae_handler.py: path = os.path.dirname(os.path.abspath(__file__)) sys.path = [path]+[p for p in sys.path if not p==path] from gluon.settings import global_settings global_settings.web2py_runtime_gae

[web2py] Re: How to translate Django+GAE project for deferred.defer in web2py

2011-12-13 Thread Constantine Vasil
good - if I go through this - you will get deferred too. ;) I am very close.

[web2py] Re: How to translate Django+GAE project for deferred.defer in web2py

2011-12-13 Thread Constantine Vasil
Actually the error I get is here: request = current.request AttributeError: 'local' object has no attribute 'request' So there is 'current' but there is not a 'request'

[web2py] Re: How to translate Django+GAE project for deferred.defer in web2py

2011-12-12 Thread howesc
can you point it at web2py/gae_handler.py or base your deferred handler off of that?