On Mon, 2011-01-31 at 21:12 -0800, Michael Merickel wrote: > I wanted to expand on the pyramid_cookbook entry (https://github.com/ > Pylons/pyramid_cookbook/blob/master/sqla.rst) for using sqlalchemy > without the scoped_session. > > So I created a gist that demonstrates more in-depth how it can be > setup and used within a project. > https://gist.github.com/805439 > > Any comments or corrections would be greatly appreciated. >
It would be useful to also show a sample view using request.db to complete the picture. It's also necessary sometimes to get at the session from a model instance sometimes (to perform another query). In a world without a global way to get a session, rather than always pass it in, I'm hoping folks can use http://www.sqlalchemy.org/docs/orm/session.html#sqlalchemy.orm.session.Session.object_session ? - C -- 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.
