new logs

File "/home/oasis/PycharmProjects/HR2/web2py/applications/HR2/models/db1.py" 
<http://127.0.0.1:8000/admin/default/edit/HR2/models/db1.py>, line 24, in 
<module>
    requires=IS_IN_DB(db, 'db.employee.id', '%(fullname)s')),
  File "/home/oasis/PycharmProjects/HR2/web2py/gluon/validators.py", line 529, 
in __init__
    (ktable, kfield) = str(field).split('.')
ValueError: too many values to unpack


On Sunday, August 14, 2016 at 11:02:56 PM UTC+2, Oasis Agano wrote:
>
> My code is the following im trying to assign a department to employees and 
> also create a manager in a department table
>
> db = DAL(lazy_tables=True)
> db.define_table('employee',
>             Field('fullname','string',label='Name'),
>             Field('email','string'),
>             Field('phone','string'),
>             Field('kids', 'string'),
>             Field('phone', 'string'),
>             #Field('date','datetime'),
>             Field('dob', 'datetime', label='Date'),
>             Field('department', 'reference department',
>                   requires=IS_IN_DB(db, db.department.id, 
> '%(department_name)s')),
>             auth.signature,
>             format='%(fullname)s'
>
>             )
> db = DAL(lazy_tables=True)
> db.define_table('department',
>             Field('department_name', 'string', label='Department Name'),
>             # Field('department_name', 'string', label='Department Name'),
>             Field('manager', 'reference employee', required='true',
>                   requires=IS_IN_DB(db, db.employee.id, '%(fullname)s')),
>             auth.signature,
>             format='%(department_name)s'
>             )
>
>

-- 
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.

Reply via email to