Since anything you do with request.response is ignored if a view returns a 
response I found myself needing to use a request response callback. This did 
not quite work as planned though: if you use pyramid_tm  the pyramid router 
will invoke commit the transaction before the response callbacks are called, 
which means any SQLAlchemy model instances will raise an exception if you try 
to use them in your response callback. This does not seem to match the 
documentation which says the response callback is invoked after the response is 
created without any mention of tweens having been run earlier. This also means 
response callbacks and finished callbacks are pretty much equivalent right now, 
so I'm not sure I see the point of having both. As a naive user I would expect 
the order to be: response callbacks, tweens, finished callbacks. Is there a 
reason that order is not used?

Wichert.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-devel+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-devel.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to