On Wed, Aug 15, 2007 at 06:04:22PM -0700, Mike Orr wrote: > I've updated "SQLAlchemy for people in a hurry" with the new > SQLAlchemy 0.4 programming pattern designed by Ben, MikeB, and myself. > We're no longer using SAContext but instead putting the engine, > metadata, and contextual session directly in our application code. > This allows you to apply advanced concepts directly from the > SQLAlchemy manual. > > http://wiki.pylonshq.com/display/pylonscookbook/SQLAlchemy+for+people+in+a+hurry
Oh, well, the whole project seems to be a increasingly moving target. First pylons.database is deprecated and replaced by SAContext. Then SAContext is deprected. Takes some getting used to. Rants aside. I'm converting my project to comply with the suggestions of "SQLAlchemy for people in a hurry". One typo seems to be the "sqlalchemy.default.uri" and "sqlalchemy.uri" in the development.ini that leads to key errors not finding the "url" key. Changing it to "sqlalchemy.url" works better. That one was easy to find and I added a comment to that page. Worse is that I can't query for objects through "paster shell". I get this exception: /home/chaas/projekte/dnsdhcp/dnsdhcp/model/__init__.py in pylons_scope() 16 import thread 17 from pylons import config ---> 18 return "Pylons|%s|%s" % (thread.id, id(config)) 19 20 # Global session manager. Session() returns the session object appropriate for the current web request. AttributeError: 'module' object has no attribute 'id' I'm not threading expert so I don't know where to look. In "ipython" the thread module doesn't have an id. Thanks for any hints. Christoph --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---