Re: [Zope-dev] Re: death to index_html; ObjectManager?
On Tuesday 16 Apr 2002 10:25 pm, Casey Duncan wrote: >However, you should know that the crux of this change is really to the >publisher, the mixin is just the management piece. Hmmm. Thanks for raising this. I wasnt aware that these browser_default changes went so deep. Im curious as to *why* they do. It looks like the requirements on the wiki could have been implemented by getting the management interface to add a smart index_html attribute that delegates to the real method. > *any* object can >define a browser_default hook that overrides 'index_html', not just >objectmanagers. Ive just checked through the implementation to see if you really mean *any* object. and you do. The name browser_default is in the namespace accessible to PropertyManager (for properties) and ObjectManager (for sub-objects). I guess this choice was deliberate, but I can see it being a problem for all those objects that are "objects" not "content". I would be happier if this change to ZPublisher was conditional on something outside the through-the-web manageable namespace, and something which means it is turned off by default for legacy objects. Either an interface assertion, or something like: *** lib/python/ZPublisher/BaseRequest.py27 Mar 2002 21:51:05 - 1.47 --- lib/python/ZPublisher/BaseRequest.py17 Apr 2002 08:39:49 - *** *** 254,256 entry_name = path.pop() ! elif hasattr(getattr(object, 'aq_base', object), 'browser_default'): --- 254,258 entry_name = path.pop() ! elif getattr(getattr(object, 'aq_base', object), ! '_implements_browser_default', 0) and \ ! hasattr(getattr(object, 'aq_base', object), 'browser_default'): ___ 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] Re: death to index_html; ObjectManager?
On Tue, 16 Apr 2002, Casey Duncan wrote: > However, you should know that the crux of this change is really to the > publisher, the mixin is just the management piece. *any* object can > define a browser_default hook that overrides 'index_html', not just > objectmanagers. All the more reason to make it a mixin, yes? --RDM ___ 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] Re: death to index_html; ObjectManager?
Well I honestly hadn't considered that. So, I suppose changing to to a mix-in inherited by folder is better. However, you should know that the crux of this change is really to the publisher, the mixin is just the management piece. *any* object can define a browser_default hook that overrides 'index_html', not just objectmanagers. -Casey Jeffrey P Shell wrote: > On 4/16/02 8:53 AM, "Casey Duncan" <[EMAIL PROTECTED]> wrote: > > >>The implementation adds the API to manage browser default for all >>objectmanagers. However, no browser_default handler is actually added to >>the object unless you specify a default other than "index_html" >> >>What was the specific "undesirable effects" you were seeing? >> >>If it is agreed that this management should apply to folders rather than >>all object managers, then I can make this change. In that case using a >>separate mix-in makes sense to me. It could even be registered for use >>as a base class for ZClasses then, which would be some advantage I suppose. >> > > +1 for the separate mix-in. I use ObjectManager as a base class frequently > for non-folderish objects, for which the whole 'death to index_html' notion > is moot. > > ___ 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] Re: death to index_html; ObjectManager?
On 4/16/02 8:53 AM, "Casey Duncan" <[EMAIL PROTECTED]> wrote: > The implementation adds the API to manage browser default for all > objectmanagers. However, no browser_default handler is actually added to > the object unless you specify a default other than "index_html" > > What was the specific "undesirable effects" you were seeing? > > If it is agreed that this management should apply to folders rather than > all object managers, then I can make this change. In that case using a > separate mix-in makes sense to me. It could even be registered for use > as a base class for ZClasses then, which would be some advantage I suppose. +1 for the separate mix-in. I use ObjectManager as a base class frequently for non-folderish objects, for which the whole 'death to index_html' notion is moot. -- Jeffrey P Shell www.cuemedia.com ___ 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] Re: death to index_html; ObjectManager?
On Tuesday 16 Apr 2002 3:53 pm, Casey Duncan wrote: >What was the specific "undesirable effects" you were seeing? 1. The extra tab in the management interface. 2. That an ObjectManager-derived classes might have a default method which is something other than index_html. (I havent digested this proposal enough to see whether an ObjectManager-derived class can prevent his default method from being changed, but It feels wrong that he should have to) ___ 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] Re: death to index_html; ObjectManager?
The implementation adds the API to manage browser default for all objectmanagers. However, no browser_default handler is actually added to the object unless you specify a default other than "index_html" What was the specific "undesirable effects" you were seeing? If it is agreed that this management should apply to folders rather than all object managers, then I can make this change. In that case using a separate mix-in makes sense to me. It could even be registered for use as a base class for ZClasses then, which would be some advantage I suppose. Thanks for the feedback. -Casey Toby Dickenson wrote: > I am seeing some undesirable effects of the recent 'death to > index_html' changes. > > Folders now have a 'Settings' tab to allow managers to change the > default document. This is good. > > However, the implementation of this lies in the ObjectManager class. > The browser-default capabilities may not make sense for other classes, > derived from ObjectManager, which are not general purpose 'folders'. > > I think it would make more sense for the browser-default > implementation to sit in a new mixin base class, perhaps > OFS.BrowserDefaultManager.BrowserDefaultManager, to be included as a > base class of OFS.Folder.Folder but not > OFS.ObjectManager.ObjectManager. > > Any thoughts? > > Toby Dickenson > [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 )