Hi there!
I'm not sure if this is more related to tg, pylons or mako, so I
thought, I'd just ask here.
The source code:
<%def name="event_list(events)">
<dl>
% for event in events:
## <dt>${h.link(event.name, tg.url('/events/%s' % event.url))}
(${event.type | string.capitalize})</dt>
<dt>${event.link} (${event.type | string.capitalize})</dt>
<dd>${event.description | n, h.striphtml, h.cut }</dd>
% endfor
</dl>
</%def>
throws
NameError: global name 'h' is not defined
with that line commented out.
When I remove the commenting, it works (except for that I get the link
generated twice).
Pylons Traceback:
http://pylonshq.com/tracebacks/a133f8a44af50ae18c806ab32160f8b0
It seems as if lib.helpers as h isn't imported when I only access the
property as a filter.
Or could it be related to that I'm just defining a function? I use
namespace to import the needed function from a generic lists.mak into
the rendered templates.
Please help! ;)
--
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en.