Re: Setting cookies in Pyramid for @action()s or HTTPFound redirects?

2011-03-12 Thread Jeff Dairiki
On Thu, Mar 10, 2011 at 01:07:32PM -0800, Seth wrote: Are those of us not returning real Response objects stuck with building our cookie strings manually, or am I missing something here? I think you should be able to use a sacrificial WebOb Response object to construct the cookies for you.

Re: Setting cookies in Pyramid for @action()s or HTTPFound redirects?

2011-03-12 Thread Jeff Dairiki
On Sat, Mar 12, 2011 at 01:55:21PM -0600, Michael Merickel wrote: Going through the trouble of creating a webob response is much more complicated than simply adding a response_callback. def _set_cookie(request, response): response.set_cookie()

Re: [pylons-devel] correct way to close a sqlalchemy session?

2016-04-06 Thread Jeff Dairiki
I use a reified request property to create the SqlAlchemy session. The factory function adds an "add_finished_callback" to close the session. (Why don't you have access to the request?) On Wed, Apr 6, 2016 at 11:30 AM, Jonathan Vanasco wrote: > A few routes I have need

Re: [pylons-devel] correct way to close a sqlalchemy session?

2016-04-06 Thread Jeff Dairiki
On Wed, Apr 6, 2016 at 12:57 PM, Jonathan Vanasco <jonat...@findmeon.com> wrote: > I edited my original post before hitting submit, and managed to clear out > the important stuff. Ha. > > On Wednesday, April 6, 2016 at 2:42:38 PM UTC-4, Jeff Dairiki wrote: >> >> I