Hi,
I got sth like this:

db  = DAL('sqlite://storage.sqlite')
dbt = DAL('sqlite://storage_test.sqlite')
dbs = DAL('mysql://xxx?xxx@mysql/test', migrate=False)//MANTIS database

And after that I define several tables, one of them is:

dbs.define_table(
 'mantis_project_table',
 Field('name', writable=False),
 Field('description', 'text', writable=False),
 format = '%(name)s')

dbt.define_table(
 'tests',
 Field('project', 'reference dbs.%s' % dbs.mantis_project_table), <--- I 
assume there is an issue
 Field('name', 'string'),
 Field('description'),
 Field('start_date', 'date', default=request.now, writable=False),
 Field('stop_date', 'date', writable=False),
 Field('duration', 'date', writable=False),
 Field('summary', 'text'),
 Field('status', 'list:string', default='pending'),
 format = '%(name)s')

dbt.tests.project.requires = IS_IN_DB(dbs, 'mantis_project_table.id')

<https://lh3.googleusercontent.com/-2N_HzFLVsJc/Ul1KZFE1LvI/AAAAAAAAAUA/15sFFpf87yM/s1600/fieldNotFormatted.png>
This is the only way I got this working, but auto created combo box does 
not generate representation as "'%(name)s'" - I can see only the IDs from 
dbs database. Any ideas how to fix this?
 

-- 
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/groups/opt_out.

Reply via email to