[Twisted-web] Nevow + adbapi

Luis N tegmine at gmail.com
Thu Mar 10 16:34:26 MST 2005

I must be a total moron:

I have this:

def query():
    return dbpool.runQuery("SELECT english FROM lang WHERE spanish LIKE 'hola'")

def result(res):
    if res:
        print res[0][0]
        print "Failed."

def words(ctx, data):

class PData(rend.Page):
    docFactory = loaders.stan(tags.html[
        tags.div(data="words")[ words ]])

And I get this at the terminal, which is correct:

2005/03/10 23:30 GMT [HTTPChannel,0,] - -
[10/Mar/2005:23:30:09 +0000] "GET / HTTP/1.1" 200 126 "-" "Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.0)"
2005/03/10 23:30 GMT [-] hello

But I get a big red None on the web.

More information about the Twisted-web mailing list