Home | Trees | Indices | Help |
|
---|
|
object --+ | Directive --+ | ForDirective
Implementation of the py:for template directive for repeating an element based on an iterable in the context data.
>>> from genshi.template import MarkupTemplate >>> tmpl = MarkupTemplate('''<ul xmlns:py="http://genshi.edgewall.org/"> ... <li py:for="item in items">${item}</li> ... </ul>''') >>> print tmpl.generate(items=[1, 2, 3]) <ul> <li>1</li><li>2</li><li>3</li> </ul>
Nested Classes | |
Inherited from |
Instance Methods | |||
|
|||
|
|||
|
|||
Inherited from |
Class Methods | |
Inherited from |
Class Variables | |
ATTRIBUTE =
|
|
tagname =
|
Properties | |
assign | |
filename | |
Inherited from Inherited from |
Method Details |
|
|
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Mon May 21 11:25:57 2007 | http://epydoc.sourceforge.net |