[Zope] rendering graphics from an external product

Henny van der Linde linde at inline-info.nl
Sun Mar 14 18:42:58 EST 2004


Hi,

I have this class (with subclasses) in an external product:

class
Elem_base_item(ObjectManager,Implicit,Persistent,SimpleItem.SimpleItem):
   "Eba item"
   meta_type="eba_item"

   def __init__(self,id,kop,tekst,volgorde,auteur,status,slot,type,
                kopstijl,tekststijl,auto_br,datum):
      self.id=id
      self.kop=kop

etc....

The whole thing works great but I need to possibility to add images to the
Elem_base_item class. I came up with this:

def addImg(self,f_file,REQUEST=None):
      "voegt een afbeelding toe"
      self.manage_addImage('afbeelding',title='afbeelding',file=f_file)
      self._p_changed = 1


This works in one respect: that it adds an object to Elem_base_item class.
But it won't render it as an image. I get an broken image in the browser
while using this dtml:

<dtml-if afbeelding>
 <dtml-var afbeelding>
</dtml-if>

Clearly I'm missing something. Can someone enlighten me?


Henny



I came up with this:






More information about the Zope mailing list