Paul,

On Feb 13, 1:07 pm, Paul Johnston <[EMAIL PROTECTED]> wrote:
> Hi,
>
> >>My first hurdle to get this running is that I access more than one
> >>database to get the information for the various parts of my
> >>application.
>
> >http://docs.turbogears.org/1.0/SQLAlchemy
> >I'm still having trouble grasping it conceptually in my mind though.
>
> What you probably want to do is create an SQLALchemy metadata for each
> database. TG 1.0 can only create one metadata for you from the config
> file; the others you have to manually create in code. TG 1.1 lets you
> define multiple in the config table.
>
> You need to attach your tables to the correct metadata. One option is to
> specify it explicitly for each one. Another option, if you're using
> Elixir, is to put the different database tables in different Python
> files, and set __metadata__ to the appropriate metadata in each one.
>
> Once you've done that, you can just use the tables without worrying
> about which database they belong to.
>
> If you can think of anything to add to the docs to explain this better,
> just add it - it's a wiki.
>
> Easy,
>
> Paul

Thanks for the reply. I found a lot of that info on the Elixir site
(http://elixir.ematia.de/trac/wiki/Recipes/MultipleDatabases), but I
don't understand how to make the models.py file aware of my separate
files. Do I do some kind of " from myModel import * " ?

Once I get it figured out, I'll be happy to try updating the wiki.

Mike
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to