[Twisted-web] patch: default values for slots from html templates

Tommi Virtanen tv at twistedmatrix.com
Thu Mar 3 14:06:27 MST 2005

James Y Knight wrote:
> If that's a requirement, I don't think your proposed syntax will do it, 
> because the webmonkey will see both MISSING *and* John Doe. If that's 
> not a requirement (and I personally don't think it needs to be, but as I 
> don't do much webmonkeying, could be convinced otherwise), a much 

You have a point there. I always forget the ugliness that is HTML.
Also, I don't see _any_ way to hide the default from the webmonkey,
except for CSS :(

> simpler solution is to do <n:slot name="fullname" 
> allowDefault="true">MISSING</n:slot>. That also has the advantage of not 
> breaking any current code and allowing arbitrary default contents.

Gag. Make XML tags lowercase only, please. Just default="true"?

More information about the Twisted-web mailing list