A Genshi template raises the following error:
TemplateSyntaxError: invalid syntax in expression
"${item.error}"
of"choose"
directive
The part of the template code that the error specifies is the following ('feed' is a list of dictionary which is passed to the template):
<item py:for="item in feed">
<py:choose error="${item.error}">
<py:when error="0">
<title>${item.something}</title>
</py:when>
<py:otherwise>
<title>${item.something}</title>
</py:otherwise>
</py:choose>
</item>
Basically, item.error holds either a '0'
or a '1'
and I want the output based on that. I am not sure where the error is - any help is appreciated. Thanks.