I did the same but did not work. The button changed to 'Add Person' OK,
but received an error when clicking button 'Add Person'. Is it because I am
using a different version of web2py 2016.05.10 ?
addButton=alertGrid.element(_title='Add record to database')
addButton[0]='Add Person'
addButton['_title']= 'Add Person to database'
<type 'exceptions.TypeError'> 'NoneType' object does not support item
assignment Version
web2py™ Version 2.14.6-stable+timestamp.2016.05.10.00.21.47
Python Python 2.7.6: /usr/local/bin/uwsgi (prefix: /usr) Traceback
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
Traceback (most recent call last):
File "/home/www-data/web2py/gluon/restricted.py", line 227, in restricted
exec ccode in environment
File "/home/www-data/web2py/applications/temperature/controllers/probe.py"
<https://firtreegrove.com/admin/default/edit/temperature/controllers/probe.py>,
line 129, in <module>
File "/home/www-data/web2py/gluon/globals.py", line 417, in <lambda>
self._caller = lambda f: f()
File "/home/www-data/web2py/gluon/tools.py", line 4241, in f
return action(*a, **b)
File "/home/www-data/web2py/applications/temperature/controllers/probe.py"
<https://firtreegrove.com/admin/default/edit/temperature/controllers/probe.py>,
line 70, in edit
addButton[0]='Add Person'
TypeError: 'NoneType' object does not support item assignment
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.