[Zope] Creating a ZClass which includes Image base class
Jon Whitener
webmaster@twmi.rr.com
Mon, 23 Sep 2002 20:52:29 -0400
Can someone provide a newbie with a road-map for accomplishing the following task? I'm at the bottom of the learning curve looking far, far up.
My goal is to be able to: go into the ZMI and add a "WebArticle". A WebArticle object contains the text and images for a complete print-magazine-style Web feature. It most importantly contains:
- Headline
- Deck (sub-headline text)
- Body copy (the main text of the article)
- Large Image (to accompany the article)
- Small Image (to accompany "teasers" for the article)
The full WebArticle will serve as the main content for a Web page, and I hope to use a subset of the Headline, Deck, and Small Image on the site's front page in a listing of available articles.
Where I'm currently stumped is how to create a ZClass for the WebArticle which, upon instantiation, accepts the above text fields as well as enables the upload of the images. (I'm not afraid of trying to create a Python class, I've had some OO programming classes in C++. But if Python classes are not for steaming newbies, forget it.)
I know I'm missing something big, but here's how far I've gotten: I've created a Zope product, and within it created a ZClass including a Zope Image base class. I created a property sheet that includes the text fields, added a View to the class which accesses the property sheet. (Basically, I've followed The Zope Book: Extending Zope chapter on Creating a ZClass).
When I instantiate a WebArticle, it accepts an ID, but when I click Add, I get a "File not found" error. Further, I have no idea how the Image Upload functionality will come in.
I'm not necessarily asking for step-by-step hand-holding or exact code, but I need some direction on how to create this object / functionality. I realize that I don't understand how Zope works. If my proposed solution for my goal is off-target, please let me know!
I greatly appreciate any time you can take to help a newbie get a toe-hold on this great big thing called Zope.
Thanks,
Jon
Jon Whitener
Webmaster & On-line Editor
Time Warner Cable Michigan
webmaster@twmi.rr.com