From 3cc663276be23c736258e498c3e13f1c971b5839 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 14 Jun 2007 14:05:15 +0000 Subject: [PATCH] Adapted to Cheetah 2.0. git-svn-id: file:///home/phd/archive/SVN/phdru.name/scripts@65 7bb0bf08-9e0d-0410-b083-99cee3bf18b8 --- atom_10.tmpl | 4 ++-- phd_pp.py | 2 ++ rss_20.tmpl | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/atom_10.tmpl b/atom_10.tmpl index ae5ea1e..1c8ac1b 100644 --- a/atom_10.tmpl +++ b/atom_10.tmpl @@ -22,14 +22,14 @@ #filter WebSafe $post.excerpt <p><a href="$post.URL">Read more</a>&hellip;</p> -#filter Filter +#end filter #end if #if $post.content #filter WebSafe $post.content -#filter Filter +#end filter #end if #for $c in $post.categoryList diff --git a/phd_pp.py b/phd_pp.py index 0e26573..1352b18 100644 --- 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) diff --git a/rss_20.tmpl b/rss_20.tmpl index e1779be..84149ba 100644 --- a/rss_20.tmpl +++ b/rss_20.tmpl @@ -21,7 +21,7 @@ $post.excerpt #elif $post.content $post.content #end if -#filter Filter +#end filter #end if ${post.rfc822_date} -- 2.39.5