[Twisted-web] Re: How work formless?
weeti
weeti at usr.fi
Thu Jul 7 08:31:50 MDT 2005
On 07/04/05 13:50:06, Alberto Trujillo wrote:
> Hello Donovan:
> Thank again for your help, here I send you the files. Everythings is
> working like I told you before, but I don't see the error message in
> the screen.
>
> year.html
> ----------------
> <form action="freeform_post!!selectYear" method="POST">
> Type a year: <input type="text" name="year" />
> <input type="submit" />
> </form>
>
> year.py
> ------------
> from nevow import rend, loaders
> import formless
>
> class YearChooseable(formless.TypedInterface):
> def selectYear(self, year=formless.Integer()):
> pass
> selectYear = formless.autocallable(selectYear)
>
>
> class Colorful(rend.Page):
> __implements__ = YearChooseable, rend.Page.__implements__
> addSlash = True
>
> def selectYear(self, year):
> self.test = True
> # return rend.Page.locateChild(self, context, segments)
> docFactory = loaders.xmlfile("year.html")
>
> year.tac
> -------------
> from twisted.application import internet, service
> from nevow import appserver
> import year
>
> application = service.Application("tasks")
> webserver = internet.TCPServer(8080, appserver.NevowSite
> (year.Colorful()))
> webserver.setServiceParent(application)
>
> _______________________________________________
> Twisted-web mailing list
> Twisted-web at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
>
>
Hi
Maybe you should have a place where to render those error-messages in
your template? and in any case, you can access them in IFormErrors
(ctx).
More information about the Twisted-web
mailing list