[ZPT] Guarded_getattr woes..
Tony McDonald
tony.mcdonald@ncl.ac.uk
Tue, 14 Aug 2001 16:42:57 +0100
On 13/8/01 8:14 pm, "Evan Simpson" <evan@zope.com> wrote:
> Tony McDonald wrote:
>> It yields this traceback.
>
> What is the error that goes with this traceback?
>
> Cheers,
>
> Evan @ Zope
>
>
>
Sorry Evan, the error is -
Error Type: TALESError</strong><br>
Error Value: exceptions.AttributeError on userinfo in "<PythonExpr
test(timetable_info.semgroup==data.userinfo.semgroup, 'red', 'blue')>"
I've managed to get around it by doing;
<div metal:define-macro="timetable"
tal:define="localsemgroup data/userinfo/semgroup">
...
<tbody tal:repeat="timetable_info
python:here.Actors.SQL_TT.timetable_info(semgroup='all', stage='1',
weeks='9')">
<tr bgcolor="#EEEEEE"
tal:condition="repeat/timetable_info/even">
<td tal:attributes="bgcolor
python:test(str(timetable_info.semgroup)==str(localsemgroup), 'red',
'blue')">
But I'd like to know if it's something I'm doing wrong.
TIA
Tone.
--
Dr Tony McDonald, Assistant Director, FMCC, http://www.fmcc.org.uk/
The Medical School, Newcastle University Tel: +44 191 243 6140
A Zope list for UK HE/FE http://www.fmcc.org.uk/mailman/listinfo/zope