[Zope] Problem with parameter submission to Python Scripts
Markus Gapp
markus.gapp@kfunigraz.ac.at
Thu, 10 Jan 2002 23:30:04 +0100
Hi Mark!
had a simmilar problem a few days ago:
outputdir=context.REQUEST['outputdir']
context[outputdir]makeThumbnail (image.getId())
worked for me!
good luck
markus
On Thu, 10 Jan 2002, Mark Simpson wrote:
> Hi,
>
> I'm trying to get the following script to work in zope:
>
> for image in context.objectValues('Image'):
> if not image.hasProperty('original_id'):
> context.outputdir.makeThumbnail(image.getId())
>
> Where outputdir is a parameter passed to script, and is called with
>
> makeThumbnails?outputdir=thumbnail
>
> where thumbnail is a folder in Zope.
>
> The problem is: context.outputdir.makeThumbnail(image.getId())
>
> I need the object that is refered to by outputdir.
>
> For instance if I use: context.thumbnail.makeThumbnail(image.getId())
> it works fine.
>
> I've tried getattr, getitem, but had no luck.
>
> Can anyone shed light on the correct way to do it?
>
> Thanks
> Regards
> Mark Simpson
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )