On 31/03/2011 16:00, Daniel Nouri wrote:
On Thu, Mar 31, 2011 at 4:44 PM, Chris Withers<ch...@simplistix.co.uk> wrote:
On 31/03/2011 15:40, Daniel Nouri wrote:
FWIW, get_current_request() works with 'before_insert' and
'before_update' events.
I don't see these listed here:
http://www.sqlalchemy.org/docs/orm/interfaces.html?highlight=sessionextension#sqlalchemy.orm.interfaces.SessionExtension
Where are you getting them from?
sqla 0.7 has them
Oh? You mean the one that's still in Beta? ;-)
Anyway, this got me thinking, so I have more questions...
What's the preferred way of working with transactions now, be they just
SQLAlchemy transactions or, more likely, a bunch of things tied together
by a transaction from the 'transaction' package?
repoze.tm2 seems to be the "old skool" BFG way of doing things, but is
this still the "right" way in Pyramid?
The templates/scaffolds certainly use repoze.tm2, but the book uses the
transaction package as an example for "Using Finished Callbacks". What
are the differences between these two approaches?
Related: Any chance of a RequestFinished event to subscribe to rather
than having to (rather convolutedly) subscribe to NewRequest just so
your handler can call add_finished_callback? That feels like two
competing event systems that you have to use at the same task just to
get one thing (execute code at the end of a request, but while the
request is still around, which you can't do in wsgi middlewear) done...
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
--
You received this message because you are subscribed to the Google Groups
"pylons-devel" group.
To post to this group, send email to pylons-devel@googlegroups.com.
To unsubscribe from this group, send email to
pylons-devel+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/pylons-devel?hl=en.