[Zope-Checkins] CVS: Zope/lib/python/Products/PageTemplates - PageTemplateFile.py:1.23

Fred L. Drake, Jr. fred@zope.com
Tue, 11 Feb 2003 12:17:37 -0500


Update of /cvs-repository/Zope/lib/python/Products/PageTemplates
In directory cvs.zope.org:/tmp/cvs-serv22003/lib/python/Products/PageTemplates

Modified Files:
	PageTemplateFile.py 
Log Message:
Add the App.config module and use the API it exports to get configuration
values.


=== Zope/lib/python/Products/PageTemplates/PageTemplateFile.py 1.22 => 1.23 ===
--- Zope/lib/python/Products/PageTemplates/PageTemplateFile.py:1.22	Mon Oct 14 18:36:26 2002
+++ Zope/lib/python/Products/PageTemplates/PageTemplateFile.py	Tue Feb 11 12:17:07 2003
@@ -29,6 +29,7 @@
 from ComputedAttribute import ComputedAttribute
 from ExtensionClass import Base
 from Acquisition import aq_parent, aq_inner
+from App.config import getConfiguration
 
 class PageTemplateFile(Script, PageTemplate, Traversable):
     "Zope wrapper for filesystem Page Template using TAL, TALES, and METAL"
@@ -48,7 +49,8 @@
 
     def __init__(self, filename, _prefix=None, **kw):
         self.ZBindings_edit(self._default_bindings)
-        if _prefix is None: _prefix=SOFTWARE_HOME
+        if _prefix is None:
+            _prefix = getConfiguration().softwarehome
         elif type(_prefix) is not type(''):
             _prefix = package_home(_prefix)
         name = kw.get('__name__')