[Zope] Image as a Property of a ZClass

Nathan Clark nathancolgate at gmail.com
Wed Oct 20 16:25:03 EDT 2004


I have created a ZClass, "BookReview", as a subclass of ZDTMLDocument
to hold book reviews.

The document ("raw" property) contains the review, and I have created
a property sheet, "Properties", to contain variables such as:
-bookTitle
-bookAuthor
-bookPageLength
-reviewer

The BookReview class has a method, "index_html", that orchestrates
this information into a standardized presentation.

I would like to add the ability to add an image of the book cover to
the property sheet, similar to the way that someone can add an icon to
a ZClass in the basic view.

The closest thing I have seen is adding the ObjectManager class to the
base of "BookReview" and creating a method to upload a file into it. 
This however does not allow our writers/editors to accomplish this
task from within the Properties view of the instance of "BookReview"
they just created.

Any advice, direction, or better method would be appreciated.


More information about the Zope mailing list