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:[email protected]/cookbook')
db.define_table('category',
Field('name',length=32))
db.define_table('recipe',
Field('title',length=32),
Field('description',length=256),
Field('category',db.category),
Field('date','date',default=now),
Field('instructions','text'))
db.category.name.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(db,'category.name')]
db.recipe.title.requires=[IS_NOT_EMPTY()]
db.recipe.description.requires=[IS_NOT_EMPTY()]
db.recipe.category.requires=[IS_IN_DB(db, db.category.id, db.category.name)]
db.recipe.date.requires=[IS_DATE()]
but i'm not getting a dropdown box in the category field as supposed to.
any help?