Re: [Zope-dev] Fault tolerance and thread-loss
At 12/18/00 09:58 PM, Tres Seaver wrote: >I'm not really replying to either question, but guessing at the >underlying cause of the problem: this smells *exactly* like the >behavior induced by the "multiple PUT/POST" race condition bug, >corrected by Evan Simpson's patched ZServer/HTTPServer.py: > > http://www.zope.org/Members/4am/postfixbug Or, even more, http://www.zope.org/Members/4am/postbugfix -- Dennis Nichols [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] extending objectValues() and objectIds() or ?
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 Method (install the PythonMethods product first) called say, >publishableObjectValues that does that: > >self > ># functions that returns publishable objects >result = [] >for o in self.objectValues(): >if o.isPublishable(): result.append(o) >return result -- Dennis Nichols [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] extending objectValues() and objectIds() or ?
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_ today >= 'first_date' _and_ today <= 'last_date'. This all works fine but I find myself writing DTML in many places to retrieve a list of objects with objectValues() and then looping over them making yet another list of only the objects that are publishable. What I would really like is an objectValues() and an objectIds() that return only publishable objects/ids. It looks like this could be easily accomplished by {tremble} adding an additional parameter to those two routines, say chkPub=None so that I could do a call such as objectValues('Poll',1) when I wanted just the publishable Poll items returned. However... 1. modifying ObjectManager.py doesn't seem like the best move I've ever thought of 2. I'm confused about the ObjectManager internals - can I call my isPublishable methods on objects that ObjectManager keeps in its lists? How? I guess a better question, rather than asking about this one possible solution, would be: How can I extend Zope to give me a list of objects qualified by more than just the meta_type? Guidance gleefully gathered. Thanks! -- Dennis Nichols [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )