]> git.phdru.name Git - phdru.name/phdru.name.git/blobdiff - phd_pp.py
Adapted to Cheetah 2.0.
[phdru.name/phdru.name.git] / phd_pp.py
index 0e2657362cbf783e5cf4849dac0291992283e370..1352b18a61b78d9c3a49faa3a68e5bf491a48406 100644 (file)
--- a/phd_pp.py
+++ b/phd_pp.py
@@ -18,6 +18,8 @@ full_dirs = len(os.getcwd().split('/')) + 1
 
 class phd_pp(Template):
    def __init__(self, *args, **kw):
+      if not hasattr(self, "_fileBaseName"):
+         self._fileDirName, self._fileBaseName = os.path.split(os.path.abspath(self._CHEETAH_src))
       Template.__init__(self, *args, **kw)
       directories = self._fileDirName.split('/')[full_dirs:] # remove directories up to "./files"
       dirs_to_root = len(directories)