tags has to be a list of strings, try: db.entries.insert(title='hello',tags='one,two,three'.split(','))
or the equivalent: db.entries.insert(title='hello',tags=['one','two','three']) On Jan 14, 10:14 am, Joseph Jude <ceph...@gmail.com> wrote: > I went into shell in a new web2py directory and tried the below. > Surprisingly, I get empty output. Any explanations? > > python web2py.py -S init -M > > db.define_table('entries', > Field('title', type='string'), > Field('tags', 'list:string')) > > >>> db.entries.insert(title='hello',tags='one,two,three') > > 1 > > >>> t=db(db.entries.tags.contains('one')).select() > >>> t.as_list() > > []