[Zope] TypeError trying to use Dtml-in on Zclass

Kapil Thangavelu kthangavelu@earthlink.net
Wed, 09 Aug 2000 14:10:23 -0700


weboats@web-oats.com wrote:
> 
> Hi All,
> 
> I have a Zclass object called States
> built with folder and renderable
> 
> When I try
> 
> <dtml-in States>
> <dtml-var sequence-item>
> </dtml-in>
> 
> I get
> Error Type: TypeError
> Error Value: hasattr, argument 2: expected string, int
> found
> 
> Does anyone know why this is happening?

educated guess:

dtml-in processes lists. you can pass it in any pythonish expression
that generates a list. your passing it in the object States which would
be fine only if your render method generates a list. i'm thinking what
you want is

if you want is a specific method of States like individual states

<dtml-in "States.get_all_states(_.None, _)">
<dtml-var sequence-item>
</dtml-in>

Kapil