[Zope] objects invisible

J Cameron Cooper jccooper@jcameroncooper.com
Sat, 01 Mar 2003 12:39:16 -0600

> Im a zope newbie and have startet making a product solely through 
> Python (leaving the management interface behind!). Inside my product 
> object I want to make a folder containing images. My problem is that 
> when I create folders and images through Python it aint visible in the 
> management interface. How to I make them visible?

Objects which are merely attributes of an object won't show up in the 
ZMI. (It would be a neat trick though.) For the ZMI to see it, it has to 
be done in a 'folderish' manner. When you have some folderish object you 
want to add an object to, you say

folder.manage_addXXX(id, title, ...)

where XXX is the name of the product, and the elipsis is the rest of the 
arguments. Some products use a non-'manage_'  naming convention: check 
the source/api docs/add form. You'll have to anyway to check the 
arguments. If you are in a folderish object, you would replace the 
'folder' above with 'self'.

If you want to know more about this machinery, look at _setObject in 
ObjectManager. To look into a folderish object, you use the 
object[Items/Values/Ids] methods, which you probably know about already.

> Secund, can someone explain to me what implicit objects are available 
> so Im able to communicate with Zope (I have had a hard time trying to 
> figure out howto communicate with Zope through a Python product - the 
> docs API aint well documented) 

I'm not quite sure what you're looking for here, but maybe you want to 
take a look at the Globals.py and App/*.py, especially Common.py and