[Zope-Checkins] CVS: Zope/lib/python/ZPublisher - BaseRequest.py:1.48

Casey Duncan casey@zope.com
Tue, 16 Jul 2002 09:01:49 -0400


Update of /cvs-repository/Zope/lib/python/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv18951

Modified Files:
	BaseRequest.py 
Log Message:
Renamed browser_default to __browser_default__ to remove it from the TTW namespace.


=== Zope/lib/python/ZPublisher/BaseRequest.py 1.47 => 1.48 ===
             # Probably a browser
             no_acquire_flag=0
             # index_html is still the default method, only any object can
-            # override it by implementing its own browser_default method
+            # override it by implementing its own __browser_default__ method
             method = 'index_html'
         elif self.maybe_webdav_client:
             # Probably a WebDAV client.
@@ -252,16 +252,15 @@
                 # Check for method:
                 if path:
                     entry_name = path.pop()
-                elif hasattr(getattr(object, 'aq_base', object), 
-                             'browser_default'):
+                elif hasattr(object, '__browser_default__'):
                     # If we have reached the end of the path. We look to see
-                    # if the object implements browser_default. If so, we
+                    # if the object implements __browser_default__. If so, we
                     # call it to let the object tell us how to publish it
-                    # browser_default returns the object to be published
+                    # __browser_default__ returns the object to be published
                     # (usually self) and a sequence of names to traverse to
                     # find the method to be published. (Casey)
                     request._hacked_path=1
-                    object, default_path = object.browser_default(request)
+                    object, default_path = object.__browser_default__(request)
                     if len(default_path) > 1:
                         path = list(default_path)
                         method = path.pop()