On 9/24/07, Paul Johnston <[EMAIL PROTECTED]> wrote: > > Hi, > > >I'm using TurboGears 1.0.4b1 with Elixir. My problem is that data is not > >committed in the database. "tg-admin sql create" worked perfectly (tables are > >created). I assembled an easy "test case" [1]. > > > > > This is probably Elixir using a different SessionContext to TurboGears.
I think you're correct on this. > From your point of view this is a bug in TG/Elixir integration. I'm > sure it will be fixable, although right now I can't think how. I'm off > on hols now; if you're still stuck in 10 days, drop me a line. As far as I can see (I'm not a TurboGears user), the problem is that you don't tell Elixir that your entities are using TurboGears session. Depending on the version of Elixir you are using (0.3.0 or trunk -- the upcoming 0.4.0), you can do that by having a module-level session attribute in your model file, pointing to TurboGears session, or (in Elixir trunk), you can use the "using_options(session=...)" option. In short, adding the following line to your model files, should fix your problems: from turbogears.database import session -- Gaƫtan de Menten http://openhex.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

