On Wednesday 27 May 2009, Mark Ramm wrote:
> Another option would be to create a ModelRegistry and then have you
> functions import that and grab the classes off of there.
>
> But I think bound metadata may be what you want.   It might be worth
> documenting that use case better, but I'm pretty swamped at the
> moment.   Hopefully somebody can step up and help out...
>
> --Mark Ramm
>

I'd be happy to provide documentation for this use-case if I knew how it 
worked. I just looked at the tg source and the app_cfg.py imports the model 
before setting up the db connection. Then in load_environment the engine 
object is created followed by a call to the init_model function in the model.

So where would I add code to bind the metadata? It would need to be before 
xxx.model is imported I guess. I sure could add code to app_cfg.py, but then 
a second engine would be created by the later calls.
Is there some way to "hook in" a custom "make_load_environment" to avoid the 
second call to setup_sqlalchemy?

Uwe

--~--~---------~--~----~------------~-------~--~----~
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