[Twisted-web] Re: form attributes in an html file

Matt Goodall matt at pollenation.net
Mon Jun 21 17:23:04 MDT 2004


On Mon, 2004-06-21 at 17:57 -0400, Alex Levy wrote:
> On 6/21/2004, "vicky" <vlupien at drummonddesigns.com> wrote:
> 
> >I looked at the customform.tac example which uses the loaders.xmlstr and
> >filled the attributes this way:
> -(snip)-
> >I've done the same thing in my HTML file and that doesn't works. I was
> >wondering if there's another way to do this.
> 
> As far as I remember, nevow:attr only works with xmlstr/xmlfile, not
> htmlstr/htmlfile.

No, I fixed that a while ago now. IIRC, it was before the 0.2.0 release.

Cheers, Matt

> 
> If it were me, I would just have something like:
> 
> # <form nevow:render="updateFormAction">..</form>
> def render_updateFormAction(self, ctx, data):
>   if something: return ctx.tag(action='/something')
>   else: return ctx.tag(action='/otherthing')
> 
> _______________________________________________
> Twisted-web mailing list
> Twisted-web at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
-- 
     __
    /  \__     Matt Goodall, Pollenation Internet Ltd
    \__/  \    w: http://www.pollenation.net
  __/  \__/    e: matt at pollenation.net
 /  \__/  \    t: +44 (0)113 2252500
 \__/  \__/
 /  \          Any views expressed are my own and do not necessarily
 \__/          reflect the views of my employer.




More information about the Twisted-web mailing list