did you received an error on your code?
just an idea why not separate it into another table
e.g.
db = DAL(lazy_tables=True)
db.define_table('department',
Field('name'),
auth.signature,
format='%(name)s'
)
db.define_table('role',
Field('name'),
auth.signature,
format='%(name)s'
)
db.define_table('employee',
Field('fullname'),
Field('email'),
Field('phone'),
Field('kids'),
Field('phone'),
Field('dob', 'datetime'),
Field('department', 'reference department',
requires=IS_IN_DB(db, db.department.id, '%(name)s') ),
Field('role', 'reference role',
requires=IS_IN_DB(db, db.role.id, '%(name)s') ),
auth.signature,
format='%(fullname)s'
)
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.