[Zope] Still can't add photo programmatically
Jay, Dylan
djay@lucent.com
Tue, 8 Feb 2000 10:04:07 +1100
self.manage_addProduct['Photo'].manage_addPhoto(self.this(),name, file,
content_type=type)
will work.
> -----Original Message-----
> From: Nicholas Piper [mailto:pcomm@inorbit.com]
> Sent: Monday, February 07, 2000 8:41 AM
> To: zope@zope.org
> Subject: [Zope] Still can't add photo programmatically
>
>
> I'm very confused as to why I can add Photo
> objects via a URL such as
>
> http://localhost:8080/Intranet/Stuff/manage_addProduct/Photo/m
> anage_addPhoto
>
> (with proper 'arguments' of course)
>
> yet calling
>
> <dtml-call
> "PARENTS[0].manage_addProduct.Photo.manage_addPhoto(PARENTS[0]
> ,'id', '', 'title', REQUEST)">
>
> fails. Part traceback is ;
>
> File
> /usr/local/home/nicholas/downloads/Zope-2.1.1-src/lib/python/D
ocumentTemplate/DT_Util.py, line 335, in eval
> (Object:
> PARENTS[0].manage_addProduct.Photo.manage_addPhoto(PARENTS[0],
> 'id', '', 'title', REQUEST))
> (Info: PARENTS)
> File <string>, line 0, in ?
> File
> /usr/local/home/nicholas/downloads/Zope-2.1.1-src/lib/python/D
ocumentTemplate/DT_Util.py, line 127, in careful_getattr
> AttributeError: Photo
>
>
> Anyone have a clue ?!
>
> How is the URL found, if .Photo isn't found from inside DTML ?
> I've tried calling from a DTML Method *and* a Document.
> Same error !?
>
>
> --
> <pcomm@inorbit.com> <http://www.innotts.co.uk/~nicholas/>
> 2048/BEC44395 1999/08/02 Nicholas C. Piper <nicholas@innotts.co.uk>
> If you want to change the automatic PGP actions of my mailer, see;
> http://www.innotts.co.uk/~nicholas/Personal/personal.php3?page=pgp
>