[Zope] creation of new product

Max Møller Rasmussen maxm@normik.dk
Wed, 13 Jun 2001 15:05:26 +0200


> From: Gitte Wange [mailto:gitte@mmmanager.org]

> I am about to create a new Zope product but ...

I have a productwizzard that you might be interrested in. It can do most of
the stuff that you can do in a zClass, in an easy way. It's a Python
program, and it is rather simple to use.

Before i release it on zope.org I just want to make it possible to make a
dateSelect type so that making dates with selectboxes will be simple. I just
havn't got around to making that work yet.

There is an ordinary date type though.

Generally you just make a short piece of code that generates a working
product that you can then modify:

----------------------------------------
newProduct = mxm_simpleProductWizzard(productTitle='tryEmAll')
    
newProduct.append(stringWdg(name='id', default='article_nn'))
newProduct.append(stringWdg(name='title', default='article title'))
newProduct.append(textWdg(name='summary', default='Write a short summary
here.'))
newProduct.append(textWdg(name='content', default='Write the content
here.'))
newProduct.append(stringWdg(name='author', default='Anonymous'))
newProduct.append(dateWdg(name='startTime', default='2000/1/1'))
## newProduct.append(dateSelectWdg('startTime')) # not yet working
newProduct.append(stringWdg(name='email', default='fill@me.out.com'))
newProduct.append(selectWdg(name='subject', optionsSource='subjects'))

newProduct.save('C:/zope23/lib/python/Products/')    
print 'Done!'
----------------------------------------

I use it as a startingpoint for my own products and it's quite ok, but still
not complete.

If you want I can mail you a zip.

regards Max M