[Twisted-web] nevow tags and class attribute

Ellers andrew at ellerton.net
Sat Apr 10 13:53:31 MDT 2004


Hey guys,

A harder question this time (well... maybe!)

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] ]

but this is fine

	return T.p("id"=paraClass)[ T.a(href=url)[resourceName] ]

its probably easy... any ideas?

Thanks
Ellers



More information about the Twisted-web mailing list