Without touching db.py I have created a new file in order to add another 
database.

I want to keep the auth data in the standard setup but keep other parts of 
my data in a large and fast external database.

The problem I am having is that I cannot reference between the databases.

in my_new_db.py:

external_db = DAL(
    'postgres://connection_string',
    pool_size=10,
    migrate=False
)

db.define_table(
    'thing1',
    Field('name_of_thing1'),
    Field(user_id, db.auth_user)
    format = '%(name_of_thing1')s'
)

external_db.define_table(
    'thing2',
    Field('name_of_thing2'),
    Field(user_id, db.auth_user)
    format = '%(name_of_thing2')s'
)

The first works fine but the second fail when I try to query from the 
thing2 table i get the error: AttributeError: 'DAL' object has no attribute 
'auth_user'

Is it possible to cross reference the databases? If so, how?

-- 

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


Reply via email to