I am doing the following steps :
>>> db = DAL('sqlite://storage.db')
>>> db.define_table('person', Field('name'), Field('country'))
>>> db.person.insert(name='John', country='UK')
>>> db.person.insert(name='David', country='US')
>>> query =
db.person.name=="David"
>>> SQLFORM.smartgrid(query)
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "....\gluon\sqlhtml.py", line 2459, in
smartgrid
if request.args(len(args)) != table._tablename:
AttributeError: 'Query' object has no attribute '_tablename'
While if I try the below code, it works fine.
>>> db(query).select()
Can some one please point me why this query is not working with "smartgrid".
Thanks
Sarbjit