alright, so i have successfully created my new database of states, counties, and zip codes. i wanted to recreate it based on a better database structure so i did it under a new DAL called db_region. however, when i have a regular db field like in the old, it would have looked like:
Field('county', db.counties, requires=IS_IN_DB(db, db.counties.id, '%(county)s')), but now when i change it to reflect the new db_region DAL, shouldn't it look like: Field('county', db_region.county, requires=IS_IN_DB(db_region, db_region.county.id, '%(county)s)), ???, cuz i get the error: Traceback (most recent call last): File "/opt/web-apps/web2py/gluon/restricted.py", line 224, in restricted exec ccode in environment File "/opt/web-apps/web2py_2.9.11/applications/afs9/models/db.py" <https://accuratefamilysupport.com/admin/default/edit/afs9/models/db.py>, line 357, in <module> format = '%(petitioner_last_name)s VS. %(respondent_last_name)s: %(case_number)s') File "/opt/web-apps/web2py/gluon/dal.py", line 8414, in define_table table = self.lazy_define_table(tablename, *fields, **args) File "/opt/web-apps/web2py/gluon/dal.py", line 8450, in lazy_define_table polymodel=polymodel) File "/opt/web-apps/web2py/gluon/dal.py", line 929, in create_table raise KeyError('Cannot resolve reference %s in %s definition' % (referenced, table._tablename)) KeyError: 'Cannot resolve reference county in cases definition' when i try to recompile the code. so what am i doing wrong in this field definition. thanx in advance, lucas -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.