Cliff Wells wrote: > I'm trying to do some CSV imports from within the TurboGears scheduler, > so I need a new SQLAlchemy session. What's the simplest method for > doing so (short of getting the database URI from the config file, > creating a new engine, etc). Can I use some information from the model? > > Regards, > Cliff
I think you should be able to import "session" from turbogears.database and use that as-is (it's a proxy around SessionContext so it's thread-safe to do so) Remember to clear it before using it to remove any object that could remain there (in case the same thread used it before) HTH, Alberto --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

