[Zope] R: [Zope] dtml-in and maps...
Marcel Preda
marcel@punto.it
Tue, 11 Jul 2000 10:20:49 +0200
> Greetings,
>
> This seems like it should be a simple thing.... but I can't seem to find how
> to make dtml-in behave with maps. In particular, empty maps.
>
> I've tried mapping, i've tried testing _.len(map.keys()), and various other
> things. But it always fails, telling me
> Error Type: KeyError
> Error Value: 0
>
> What am I missing?
>
> Have a better one,
> Curtis.
looks like the variable that you are using in <dtml-in ...>
is noat a sequence (list || tuple)
I suppose that your var is a dictionary
Insted of :
<dtml-in x mapping>
you have to use:
<dtml-in "[x]" mapping> as a list
||
<dtml-in "(x,)" mapping> as a tuple
PM
_______________________________
"Will I be using Python today?"
and if the answer is "yes"
I know that it's going to be a good day.