[Zope3-checkins] CVS: Zope3/src/zope/app/apidoc/viewmodule - browser.py:1.6

Stephan Richter srichter at cosmos.phy.tufts.edu
Mon Mar 29 10:08:34 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/apidoc/viewmodule
In directory cvs.zope.org:/tmp/cvs-serv21101/src/zope/app/apidoc/viewmodule

Modified Files:
	browser.py 
Log Message:


Use relativisePath() for showing relative instead of absolute template file
paths.




=== Zope3/src/zope/app/apidoc/viewmodule/browser.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/apidoc/viewmodule/browser.py:1.5	Mon Mar 29 00:12:26 2004
+++ Zope3/src/zope/app/apidoc/viewmodule/browser.py	Mon Mar 29 10:08:34 2004
@@ -15,7 +15,6 @@
 
 $Id$
 """
-from os.path import dirname
 from types import ClassType
 
 from zope.interface import Interface
@@ -23,12 +22,10 @@
 from zope.app import zapi
 from zope.app.publisher.browser.icon import IconViewFactory
 from zope.app.apidoc.utilities import getPythonPath, getPermissionIds
-from zope.app.apidoc.utilities import columnize
+from zope.app.apidoc.utilities import columnize, relativizePath
 from zope.app.component.interface import searchInterfaceIds
 from zope.app.component.interface import getInterface
 
-import zope
-BASEDIR = dirname(dirname(dirname(zope.__file__)))
 
 class Menu(object):
     """Views module Menu"""
@@ -174,7 +171,7 @@
         # interested in. Usually the first listed class is the interesting one.
         base = factory.__bases__[0]
         info['path'] = base.__module__ + '.' + base.__name__
-        info['template'] = factory.index.filename.replace(BASEDIR, 'Zope3')
+        info['template'] = relativizePath(factory.index.filename)
 
     elif isinstance(factory, (str, unicode, float, int, list, tuple)):
         info['referencable'] = False




More information about the Zope3-Checkins mailing list