[Zope] passing parameter problem

Laura McCord Laura.McCord at doucet-austin.com
Wed Sep 15 17:53:01 EDT 2004


I tried what you suggested and that did not work either. actStatus will
not be null.
tal:define="actStatus result/Active_Inactive" returns either active or
inactive and that is working correctly. 

This is what my python script looks like which includes a parameter,
actStatus:
if actStatus == 'active':
 return "#000"
if actStatus == 'inactive':
 return "#b7b7b7"

I have been working on this for two days straight and it has me stumped.

Any help or suggestions would be great.

Thanks,
 Laura

Laura McCord wrote:
> It seems like I have done this hundreds of times and it worked. Can
some
> point out what I am doing wrong?
> 
> <div tal:define="actStatus result/Active_Inactive;
>                  colorStat python:here.statChk(actStatus)">

That seems correct to me. actStatus can be None?

> I also tried this:
>  
>     <div tal:define="colorStat python:here.statChk('${actStatus}')">

IIRC you should user statChk(string('${actStatus}')) or 
statChk(path('actStatus'))


HTH
-- 


More information about the Zope mailing list