Hello,

The normal behavior is: The user presses the Test button, then <div 
id="sql"></div> show "ABCD". (The code is shown below)

In development mode running rocket, works well, but in production ajax call 
is not executed.


Environment:

Web2py 2.4.6 (Version 2.4.6-stable+timestamp.2013.05.08.16.52.12)
FreeBSD 9.1
Nginx-1.4.0
Uwsgi-1.4.9

uwsgi.conf:

<uwsgi>
  <socket>127.0.0.1:9001</socket>
  <pythonpath>/home/web2py/</pythonpath>
  <module>wsgihandler</module>
  <processes>4</processes>
  <buffer-size>8192</buffer-size>
</uwsgi>

nginx.conf
...
location ~ /myapp{
            uwsgi_pass  127.0.0.1:9001;
            include     uwsgi_params;
}

...


default.py:

def index():   
   return dict()


def bg_test():
    id = request.vars.id
    return id




default/index.html:



{{extend 'layout.html'}}

<script type="text/javascript">


function test(){
    $('#id').val('ABCD');    
    ajax('bg_test', ['id'], 'sql');
}
</script>
<form>
    <input type="hidden" name="id" id="id" value="" />
</form>


<button type="button" onclick="test()">Test</button>


<div id="sql"></div>


I think the problem is not web2py, I tested with version 1.99.4 and also 
works bad.

Something that can be changed or added in nginx.conf or uwsgi.conf?
Any idea?

Best Regards
Jose

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to