One thing that is not mentioned in any of the tutorials that I needed
get sqlalchemy to work is the following in base.py
from pylons.database import make_session
from pylons.database import session_context
class BaseController(WSGIController):
def __call__(self, environ, start_response):
session_context.current = make_session()
return WSGIController.__call__(self, environ, start_response)
With out this the model would get into an inconsistent state when
doing updates and inserts. This was a very disconcerting problem, and
it took about a 1/2 day of going through the archives to figure out a
solution.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---