[Twisted-Python] Re: nuvow webform example?

Alan Ezust alan.ezust at gmail.com
Fri Dec 24 18:53:10 EST 2004


oops. That last message was not clear at all.

Let me try again...

I'm following the tutorial. I defined classes

class ISimpleMethod(TypedInterface):
class Implementation(object):
as shown in the tutorial. Then I fixed up the webform, and here is my version:

class WebForm(rend.Page):
    docFactory = loaders.stan(
    tags.html[ tags.body[
        tags.h1["Here is the form:"],
        webform.renderForms('original')
    ]])

And here is a handler that is supposed to render the form.

def handler(req):
    req.content_type = "text/html"
    req.send_http_header()
     # this was the greeting example - works great.
    page = SearchPage("My name is Joe")    
    page.renderString().addCallback(req.write)

    # webform example - attempt to display.
    # I see "here is the form" but nothing else
    resource = WebForm(Implementation())
    resource.renderString().addCallback(req.write)

    return apache.OK




More information about the Twisted-Python mailing list