durusmail: durus-users: Pylons/Durus tutorial
Pylons/Durus tutorial
2006-12-13
2006-12-13
2006-12-13
2006-12-13
Pylons/Durus tutorial
Mike Orr
2006-12-13
Hi all.  I wrote a tutorial on using Pylons with Durus, specifically
on modifying the QuickWiki tutorial to use Durus instead of
SQLAlchemy.

http://sluggo.scrapping.cc/python/

You'll probably want to read at least the first part of "Pylons
Execution Analysis" to put it in context.

One remaining issue is where to put the database connection.  Right
now I create it in the controller's .__begin__() method, but that
recreates it (and the client socket) for every request.  I may be able
to put it in Pylons' 'g' object if it's truly a thread-local global,
which I'm verifying.  Otherwise I may make a connection pool and stick
it somewhere.  Does the overhead in opening a connection to a Durus
server matter that much?  I'm using TCP sockets rather than Unix
domain sockets because I couldn't get the latter to work.

--
Mike Orr 
reply