[Twisted-web] nevow tags and class attribute
Matthew Scott
twisted at goldenspud.com
Sat Apr 10 14:34:00 MDT 2004
On Saturday 10 April 2004 14:53, Ellers wrote:
> Using nevow.tags I want to emit a paragraph such as:
> <p class="dirItem">blah</p>
> Problem is, "class" is naturally a keyword so python won't let me do this:
> return T.p("class"=paraClass)[ T.a(href=url)[resourceName] ]
Use a leading underscore to assign something to "class". Nevow will strip
that out for you:
return T.p(_class=paraClass)[...]
--
Matthew Scott <spud at goldenspud.com>
More information about the Twisted-web
mailing list