hi,
i'm just starting to learn web2py and i'm worndering what i'm doing wrong
here:
my db.py contains:
import datetime
now=datetime.date.today()
db=SQLDB('mysql://cookbook:cookbook@127.0.0.1/cookbook')
db.define_table('category',
Field('name',length=32))
*THIS*:
db.recipe.category.requires=[IS_IN_DB(db, db.category.id, db.category.name)]
Will give you text box with auto complete widget.
*THIS*:
db.recipe.category.requires=IS_IN_DB(db, db.category.id, db.category.name)
Will give you dropdown widget
Just a matter of [ ]
We have a small problem in the use of IS_IN_DB. Only you can use this, and
if
want to use a IS_NOT_EMPTY for example, does not display the dropdown list.
_
*Gilson Filho*
*Web Developer
http://gilsondev.com*
3 matches
Mail list logo