Additionally...

I currently have three apps, including CAS server
the case server app also contain other tables

db.define_table('base_tags',
                Field('name', 'string', label='Tag', length=64, 
required=True, notnull=True),
                format='%(name)s'
                )
and many more

some of these tables in the CAS server db model is accessed by the other 
apps.


db.define_table('places_tags',
                Field('place_id', db.places, label='Place', required=True, 
notnull=True, writable=False, readable=False),
                Field('tag_id', *db.base_tags*, label='Tag', required=True, 
notnull=True, writable=False, readable=False)
                )


I am getting this error:


Traceback (most recent call last):
  File "C:\web2py\gluon\restricted.py", line 205, in restricted
    exec ccode in environment
  File "C:/web2py/applications/histreet/models/db.py" 
<http://127.0.0.1:8000/admin/default/edit/histreet/models/db.py>, line 374, in 
<module>
    Field('tag_id', db.base_tags, label='Tag', required=True, notnull=True, 
writable=False, readable=False)
  File "C:\web2py\gluon\dal.py", line 6343, in __getattr__
    return self[key]
  File "C:\web2py\gluon\dal.py", line 6337, in __getitem__
    return dict.__getitem__(self, str(key))
KeyError: 'base_tags'


*Does anyone know why this is happening?*

***Migrate is off for auth
** Migrate is on for all other tables (changed it to off got the same error)
*




On Friday, July 6, 2012 10:02:53 AM UTC-4, Horus wrote:
>
> I desire to have multiple apps. one of them will be a CAS provider My 
> questions are:
>
> 1. Can these app have different databases
>    i.e db = DAL('postgres://user:password@localhost:5432/cas', 
> migrate=True), db = DAL('postgres://user:password@localhost:5432/db1', 
> migrate=True),   db = DAL('postgres://user:password@localhost:5432/db2', 
> migrate=True)
>
> 2. How do I access these database tables  across applications?
>     i.e how can app1 access CAS database OR how can app2 database to 
> access app1 database
>
>
>
> *Auth migration if disabled for all except CAS provider
>

Reply via email to