[Zope] Having problems with python script

Laura McCord Laura.McCord at doucet-austin.com
Fri Sep 17 16:57:45 EDT 2004


I just realized that I should have made my fields of type VARCHAR
instead of CHAR. Apparently, my values were padded with whitespace.

Thanks so much for responding.
 -Laura


-----Original Message-----
From: Dan Fairs [mailto:monster at spiderplant.net] 
Sent: Friday, September 17, 2004 3:28 PM
To: Laura McCord
Cc: zope at zope.org
Subject: Re: [Zope] Having problems with python script


Hi Laura,

>   <div tal:define="results here/view_users;
>                    batch python:here.getBatch(results)">
>   .
>   .
>   .
>    <div tal:repeat="result batch"
>     <div tal:define="userName result/username">
>      <div tal:replace="python:here.ldapInfo(userName)"/>   -----> Does
> not work!!!

What's the problem exactly? You don't get anything back?

What happens if you put in a

<pre tal:content="string:#${userName}#">user</pre>

just after the div with the define? Does it contain what you expect?
Look in particular for case sensitivity, unexpected whitespace padding
(often happens if that username is coming out of a database field of
type CHAR)? Look for funny spaces/characters before and after those hash
signs.

Cheers,
Dan



More information about the Zope mailing list