[Twisted-web] 'mapping' renderer must not use 'slot'

Valentino Volonghi aka Dialtone dialtone at divmod.com
Sat Feb 12 05:45:03 MST 2005

Sridhar Ratna wrote:

>I will put it shortly.  Imagine a mapping type like this ..
>map = {
>   '1': 'ordinary_string_suitable_for_slot', # simple value
>   '2': [ {4:5}, {6:7} ] # complex value
>If data_foo returns the above dict, the usual way to render it is
>using render="mapping". (we assume perfect decoupling between logic
>and presentation)
>But 'mapping' renderer uses 'slots'.  'slots' could handle only the
But you are misusing rendering machinery.

<div n:data="foo">
    <h2><span n:data="1" n:render="string" /></h2>
   <h3><span n:data="2" n:render="mapping"><n:slot name="foo.2" 
/><n:slot name="foo.2bis" /></span></h3>

works and does what you need.

More information about the Twisted-web mailing list