[Twisted-web] getting started with nevow
Luc Saffre
luc.saffre at gmx.net
Fri Nov 19 05:35:36 MST 2004
Hello,
I am experimenting with twisted and nevow.
I have a twisted server running at http://lsaffre.dyndns.org:8088/
I am using the latest SVN snapshot of nevow.
This server has some simple .rpy scripts; they all work, except the
nevow scripts, who produce a traceback instead. You can see the
traceback if you look at
http://lsaffre.dyndns.org:8088/nevow2.rpy
The source of this page is taken from
http://www.divmod.org/Home/Projects/Nevow/index.html
more exactly, here is the complete source:
------------- file nevow2.rpy :
from formless.annotate import TypedInterface, Integer, String
class ISimpleMethod(TypedInterface):
def simple(self,
name=String(description="Your name."),
age=Integer(description="Your age.")):
"""Simple
Please enter your name and age.
"""
class Implementation(object):
__implements__ = ISimpleMethod,
def simple(self, name, age):
print "Hello, %s, you are %s years old." % (name, age)
from nevow import rend, tags, loaders
from formless import webform
class WebForm(rend.Page):
docFactory = loaders.stan(
tags.html[
tags.body[
tags.h1["Here is the form:"],
webform.renderForms('original')
]
])
resource = WebForm(Implementation())
---------------------
Question: what is going wrong here?
tia,
Luc
More information about the Twisted-web
mailing list