[Zope] Creating a New Object Type - Use ZClass or Python?
eric jones
ej@ee.duke.edu
Fri, 30 Jul 1999 05:30:19 -0400
Hello,
Forgive me if this is a double post - I sent it to zope@egroups.com , and it
never appeared in the posts as far as I could tell.
I'm pretty comfortable with Python, but new to Zope. We're trying to figure
out the best way to set up an academic web site that has a list of
publications on it. Each publication has several authors, a description,
etc. It will also have a pdf and perhaps a postcript copy of the article.
We need to be able to search the author list. I'd like to create a PubClass
that, when it displays itself looks like:
"Some silly paper" IEEE Trans. on Antennas and Propagation
Description: Some rubbish about how great the silly paper is.
Authors: Eric Jones, Larry Carin, William Joines
PDF: link_to_pdf_file_object (size)
PS: link_to_ps_file_object (size)
I'd like the Add form to have places for adding all the basic properties.
The paper title, journal name, and description are pretty straight forward I
think. The authors are a little more troubling. I'd like to make them a
list of tuples:
[ (first_name,last_name), (first_name,last_name),...]
to facilitate searching for a particular author (so that only Larry Carin's
papers are displayed on his page). Is there a way to do this sort of thing
with ZClasses? Also, I want the Add form to have places to browse for the
pdf and ps files - much like a Zope File object - and then add these files
to the PubClass object.
Is this best done by creating a class in python or with the ZClass
interface?
thanks,
eric