I'm using the last version, the 2.7.4...  In version 2.7.2 the same thing
happened


On Wed, Oct 16, 2013 at 3:36 AM, Niphlod <niph...@gmail.com> wrote:

> upgrade web2py, it's a known bug.
>
> Il giorno mercoledì 16 ottobre 2013 01:46:08 UTC+2, __pyslan__ ha scritto:
>
>> Hello!
>>
>> I'm trying update a field (total_treated) with ajax. I'm using a
>> SQLFORM.grid.
>>
>> In the index.html:
>>
>> {{extend 'masterpage.html'}}
>> <script type="text/javascript">
>> $(document).ready(function(){
>> window.setInterval(function() {
>> var objs = $("[name^='t_']");
>>  for(var i = 0; i < objs.length; i++)
>> {
>> var l = objs[i].getAttribute("id");
>>  ajax('total_treated?l=' + l, ['id'], l);
>> # doesn't work:
>> # ajax('{{URL('total_treated')}}**', ['id'], 'id');
>>  }
>> }, 10000);
>> });
>> </script>
>>
>>
>> In the lists.py:
>>
>> @auth.requires_login()
>> def total_treated():
>>     print request.vars
>>
>>
>> ERROR:
>>
>> ...
>>
>>   File "/opt/web-apps/web2py/gluon/**globals.py", line 218, in 
>> parse_post_vars
>>
>>     if len(dpost):
>>   File "/usr/local/lib/python2.7/cgi.**py", line 599, in __len__
>>
>>     return len(self.keys())
>>
>>   File "/usr/local/lib/python2.7/cgi.**py", line 582, in keys
>>
>>     raise TypeError, "not indexable"
>> TypeError: not indexable
>>
>>
>> I tried a lot of things... but without success...
>>
>>
>> Help, please...
>>
>>
>> Thanks!
>>
>>  --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> 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 web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to