I would like autocomplete to show just a subset of data, not all rows in
table. Is it possible to use query in autocomplete like this?
query = db.recipe.user_id==auth.user_id
form=SQLFORM.factory(Field('title', 'string', required=True, requires=
IS_NOT_EMPTY()),
Field('type', 'string',
widget=SQLFORM.widgets.autocomplete(request, db(query).select(
db.recipe.type), limitby=(0, 10), min_length=2)),
Field('body', 'text'))
This currently throws the following exception:
<type 'exceptions.AttributeError'> 'Rows' object has no attribute
'tablename'
--