IS_NOT_IN_DB(db,'friend_name') should be
IS_NOT_IN_DB(db,'friend.name') On Nov 12, 5:29 am, Kostas M <[email protected]> wrote: > I am trying to reproduce the "What is going on with web2py?" video > (http://vimeo.com/13485916). At the 'friend' section, when I try to > enter a new friend eg. "Max" I am getting this error: > > Traceback (most recent call last): > File "C:\Temp\web2py\applications\myplayepedvm/models/ > plugin_wiki.py", line 597, in render_widget > File "C:\Temp\web2py\applications\myplayepedvm/models/ > plugin_wiki.py", line 183, in create > File "gluon/tools.py", line 2874, in create > File "gluon/tools.py", line 2817, in update > File "gluon/sqlhtml.py", line 987, in accepts > File "gluon/html.py", line 1557, in accepts > File "gluon/html.py", line 558, in _traverse > File "gluon/html.py", line 558, in _traverse > File "gluon/html.py", line 558, in _traverse > File "gluon/html.py", line 558, in _traverse > File "gluon/html.py", line 565, in _traverse > File "gluon/html.py", line 1336, in _validate > File "gluon/validators.py", line 490, in __call__ > ValueError: need more than 1 value to unpack > > meta-code is: > db.define_table('friend',Field('name',requires=IS_NOT_IN_DB(db,'friend_name'))) > > Home is: > # Test App > ## Friends > `` > name: create > table: friend > message: new friend > ``:widget > Friends: > `` > name: jqgrid > table: friend > col_width: 80 > width: 700 > height: 100 > ``:widget

