Ticket #428 (reopened defect)
UndefinedError in py:for
| Reported by: | anonymous | Owned by: | cmlenz |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | Template processing | Version: | devel |
| Keywords: | python3 UndefinedError | Cc: |
Description (last modified by cboos) (diff)
This is the code I'm running in the Python interpreter from the Documentation:
>>> 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>
And I'm getting an UndefinedError for the variable item. If I force lenient mode, the template simply does not evaluate.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
