[Zope-Checkins] CVS: Zope3/lib/python/Zope/Publisher/Browser - AttributePublisher.py:1.1.2.1
   
    Jim Fulton
     
    jim@zope.com
       
    Fri, 16 Nov 2001 16:50:28 -0500
    
    
  
Update of /cvs-repository/Zope3/lib/python/Zope/Publisher/Browser
In directory cvs.zope.org:/tmp/cvs-serv26001
Added Files:
      Tag: Zope-3x-branch
	AttributePublisher.py 
Log Message:
=== Added File Zope3/lib/python/Zope/Publisher/Browser/AttributePublisher.py ===
from IBrowserPublisher import IBrowserPublisher
class AttributePublisher:
    __implements__ = IBrowserPublisher
    def browser_traverse(self, request, name):
        if name[:1] == '_':
            raise 'NotFound'
        if name[-5:]=='.html':
            return getattr(self, name[:5])
        return getattr(self, name)
    def browser_default(self, request):
        return "index.html"