[Twisted-web] Parametrized data_foo method?

Donovan Preston dp at ulaluma.com
Mon Feb 14 07:36:29 MST 2005

On Feb 13, 2005, at 3:55 AM, Sridhar Ratna aka Srid wrote:

> <n:invisible data="foo" ....
> I would like to pass custom argument to data_foo depending the usage
> in xml templates.  Is this possible?
> Another question ...
>         <div n:data="foo">
>             <h2>
>                 <n:invisible n:data="title" n:render="post_title"/>
>             </h2>
> data_foo returns a dictionary say {"title":... "name": ... }
> Here how to access the "name" dict item from render_post_title?

If you want to access both the "title" and the "name" attribute from 
render_post_title, then don't restrict render_post_title's view of the 
data to only the "title" key.

In other words, simply remove n:data="title".

(BTW, although the subject of this post says "Parameterized data_foo 
method", this post has nothing to do with parameterized data methods)


More information about the Twisted-web mailing list