Re: [Zope-dev] extending objectValues() and objectIds() or ?

2000-10-25 Thread Dennis Nichols
Thanks for the advice (below). I added another parameter for meta type and everything works great. What's the advantage of using Python Method rather than an external method, other than thru-the-web editing? Any disadvantages? At 10/24/00 06:45 PM, Itamar Shtull-Trauring wrote: Write a Python

[Zope-dev] extending objectValues() and objectIds() or ?

2000-10-24 Thread Dennis Nichols
I have developed a flock of Python products that have attributes 'first_date', 'last_date', and 'ok_to_publish' with the intention that these attributes will be set by the content managers. Each product also has an 'isPublishable' method that returns true if 'ok_to_publish' is true _and_

Re: [Zope-dev] extending objectValues() and objectIds() or ?

2000-10-24 Thread Itamar Shtull-Trauring
Write a Python Method (install the PythonMethods product first) called say, publishableObjectValues that does that: paramself/param # functions that returns publishable objects result = [] for o in self.objectValues(): if o.isPublishable(): result.append(o) return result -- Itamar