[Twisted-Python] What is the right way to pass variables from Site to Resource?

2010-03-01 Thread markscottwright
I've got some global state and configuration information. It seems to me that they ought to be members of my Site, but I don't see any obvious way in a Resource.render_* to get the current Site. Neither Request nor Resource have a instance or method that returns its Site that I can find. Am

[Twisted-Python] Does the default session expiry work?

2010-03-02 Thread markscottwright
I'm using twisted 8.2 and (after reading glyph's latest "Twisted in 60 seconds" entry), I've realized that my sessions never expire. I never added any session expiration code, but I thought that the default code expires after 15 minutes. In the below example, I modified twisted\web\server t

[Twisted-Python] Is it possible to turn off transactions for adbapi?

2010-03-18 Thread markscottwright
I'm trying to get SQL Server 2005 to CREATE DATABASE using twisted. However, SQL Server won't allow you to run CREATE DATABASE within a transaction (apparently, it's not something sql server can roll back, which seems sensible). Which means that the following code results in an error. Is th