[Twisted-Python] 'model' attribute is showing up in processed HTML

Donovan Preston dp at twistedmatrix.com
Fri Nov 1 10:41:34 EST 2002

Hmm. view= and controller= attributes are stripped off result nodes to 
prevent infinite recursion, but I left the model= attributes in because 
it's useful for debugging to see which model= a node was applied to, in 
the output. There's no reason I couldn't strip it as well. Maybe I will 
add a "strict" mode, because as I said it's useful for debugging to see 
certain woven attributes in the output.

Maybe this is the time to create a unique woven namespace? <div 
woven:model="foo" />? It seems like a lot more typing.


On Thursday, October 31, 2002, at 04:10 PM, Alex Levy wrote:

> The 'model' node attribute from my XHTML templates is showing up in 
> the final HTML being spewed by twistd.  Is there a reason Twisted does 
> this?  It's causing my pages to fail W3C validation.  This isn't 
> happening with the 'view' attribute.
> Example:
>     <td class="sidebar" view="sidebar"></td>
>     <td class="content">
>         <div class="title" model="title"></div>
>         <span model="content"/>
>     </td>
> ...becomes:
>     <td class="sidebar">{sidebar stuff...}</td>
>     <td class="content">
>         <div model="title" class="title">This is the title.</div>
>         <span model="content">Content goes here.  w00t.</span>
>     </td>
> --
> Alex Levy
> WWW: http://mesozoic.geecs.org
> Tel: 617.835.0778
> "Never let your sense of morals prevent you from doing what is right."
> -- Salvor Hardin, Isaac Asimov's _Foundation_
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

More information about the Twisted-Python mailing list