Hi,

Update: looks like I more or less solved the problem.

For each of the databases I need to get access through SA I have a code
like this in models/__init__.py:

blog_meta = DynamicMetaData()

def init_blog_meta(meta):
    engine = get_db_engine('blog')
    meta.connect(engine)
    wp_posts_tbl = Table('wp_posts', meta, autoload=True)
    # ...

The get_db_engine() function (defined in lib.database module) calls
pylons.database.create_engine() with appropriate dburi. I am a bit
worried about performance (will those engine pools be re-inited for
each request?) but I suppose this is something I can fix later if
needed.

Hopefully someone will find this useful.

Max.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to