[Checkins] SVN: zope.kgs/trunk/src/zope/kgs/template.py Simplify and make macros work.

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Jan 27 02:55:21 EST 2009


Log message for revision 95079:
  Simplify and make macros work.
  

Changed:
  U   zope.kgs/trunk/src/zope/kgs/template.py

-=-
Modified: zope.kgs/trunk/src/zope/kgs/template.py
===================================================================
--- zope.kgs/trunk/src/zope/kgs/template.py	2009-01-27 07:53:00 UTC (rev 95078)
+++ zope.kgs/trunk/src/zope/kgs/template.py	2009-01-27 07:55:21 UTC (rev 95079)
@@ -33,17 +33,6 @@
         return rval
 
 
-class FileContext(object):
-
-    def __init__(self, path, root):
-        self.path = path
-        self.root = root
-
-    def __call__(self):
-        pt = Template(self.path, self.root)
-        return pt()
-
-
 class DirectoryContext(object):
 
     def __init__(self, path, root=None):
@@ -53,7 +42,7 @@
     def __getitem__(self, name):
         path = os.path.join(self.path, name)
         if os.path.exists(path):
-            return FileContext(path, self.root)
+            return Template(path, self.root)
         return None
 
 



More information about the Checkins mailing list