[Zope] Creating Products in Python

Jeff Rush Jeff Rush" <jrush@timecastle.net
Mon, 25 Oct 99 08:16:42 -0500


On Sun, 24 Oct 1999 11:15:39 +1000, gtk wrote:

>What's the "hello world" of Zope Products implemented in Python?

Your wish is granted -- I've updated the source to the old Poll Product
that Amos created to demonstrate how to write Zope Products in Python.
I took what I've learned from my Equation Tile product and moved it into
the Poll product this morning.

It now supports Zope 2.0.1, being subclassed via ZClasses, is CatalogAware
and shows off a few tricks such as how to add those TALLER/SHORTER/
WIDER/NARROWER buttons for resizing text input boxes.  It also shows
how to have a method return an HTML fragment when called for embedding
it into another page, or a standalone HTML source if called as it's own web page.

I didn't have time to update the Tutorial document that comes with it.
Perhaps later, or someone else is welcome to tackle it.

You can find it at the bottom of my web page at:

    http://starship.python.net/crew/jrush/Zope/

I tried for some time to upload it to www.zope.org this morning, but
the site was dog-slow and in read-only mode!  Any attempt to add
anything simply spun the indicator in Netscape, for over an hour
for a 47K upload.  Downloads worked but typically took 3-5 mins
per page.  Sheez!  I hope they get the new servers soon.


>What's the best way of forcing a product to reload? Deleting it, adding it
>again and restarting Zope is becoming somewhat tedious.

That's the way you do it -- yes it is tedious but considering how
products hook into Zope, I doubt the Python reload technique
will ever work for Products.

-Jeff Rush