[Zope] Populating a :list variable from the results of a ZSQL method
Chris Withers
chrisw@nipltd.com
Fri, 10 Nov 2000 10:39:56 +0000
Tony McDonald wrote:
>
> When this is put into an SQL database, the field 'options' is this (string)
>
> ['1', '2', '3'] or ['2', '3'] etc.
So you're storing the sequence as a string of the type shown above...
...ow ;-)
Might be best to change your SQL Schema so your store one row per
option...
Nasty hack external method:
def eval_options(self):
return eval(self.REQUEST['options'])
then you can do:
<dtml-in eval_options>
...but be careful with that external method, it could be used to do all
sorts of bad things if it gets into the wrong hands.
cheers,
Chris