[pypy-svn] r39375 - pypy/extradoc

hpk at codespeak.net hpk at codespeak.net
Sun Feb 25 08:11:05 CET 2007


Author: hpk
Date: Sun Feb 25 08:11:01 2007
New Revision: 39375

Modified:
   pypy/extradoc/confrest.py
Log:
add mydir logic to correctly generate extradoc pages


Modified: pypy/extradoc/confrest.py
==============================================================================
--- pypy/extradoc/confrest.py	(original)
+++ pypy/extradoc/confrest.py	Sun Feb 25 08:11:01 2007
@@ -1,4 +1,5 @@
 from py.__.doc.confrest import *
+import py
 
 class PyPyPage(Page): 
     def fill(self):
@@ -14,6 +15,10 @@
                    class_="menu"), 
             " ", id="menubar")
 
+    def get_doclink(self, target):
+        return relpath(self.targetpath.strpath,
+                       self.project.get_docpath().join(target).strpath)
+
 class Project(Project): 
     title = "PyPy" 
     stylesheet = 'http://codespeak.net/pypy/dist/pypy/doc/style.css'
@@ -25,5 +30,8 @@
                      src="http://codespeak.net/pypy/img/py-web1.png", 
                      height=110, width=149)))
     Page = PyPyPage 
+    mydir = py.magic.autopath().dirpath()
+    def get_docpath(self):
+        return self.mydir
 
 



More information about the Pypy-commit mailing list