Thanks Savio, I created a clean app to test this out and it works
great. Regards. >Jeff
On Jan 14, 12:28 pm, Savio Sabino wrote:
> Hi, the follow model is rigth to crud:
>
> db.define_table('category',iObj,
> Field('parent','reference category'),
> Field('name'),
> format='%(name)s')
Hi, the follow model is rigth to crud:
db.define_table('category',iObj,
Field('parent','reference category'),
Field('name'),
format='%(name)s')
db.category.parent.requires = IS_EMPTY_OR(IS_IN_DB(db,
db.category.id, '%(name)s'))
db.category.name.requires = IS_NOT_IN_DB(db, db.category.
Okay, I figured out what was wrong:
1. To make crud create produce a drop-down select for the reference
field, I needed to add a "requires is_in_db" statement referencing the
same table. That was a dumb oversight on my part.
2. The crud read needed to be replaced by a custom query using
with_alia
3 matches
Mail list logo