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

Alex Levy mesozoic at polynode.com
Mon Jun 21 15:57:51 MDT 2004


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.

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')



More information about the Twisted-web mailing list