I have a buch of controllers that define a __before__ method to attach
a session as per the QuickWiki tutorial.

Some methods on my mapped model classes require access to the database.
I want to flush or discard all updates resulting from a request  at the
'bottom' of the controller. I have found no other solution than to pass
the session from the controller as an argument in the call to my model
object.

Is there a better way?

If I update an object through an html form post, process, flush and
redirect to self, I sometimes see the old values. I first believed that
some funky browser caching was doing this, but now I suspect Pylons is
sending back old data. If I reload quickly and continuously, I see the
old values once every few requests.

I believe that these problems may be connected.

Reading all the messages here and the documentation for Pylons and
SQLAlchemy still didn't bring me the insight I need.

How can I create a seperate, 'clean' session for each request?

How can I get a reference to this same session from different places in
my app?

I am running whatever "paster serve --reload development.ini" starts up.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss
-~----------~----~----~----~------~----~------~--~---

Reply via email to