[ZPT] CVS: Releases/Zope/lib/python/Products/PageTemplates - PageTemplateFile.py:1.6

Evan Simpson evan@zope.com
Mon, 12 Nov 2001 10:55:43 -0500


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

Modified Files:
	PageTemplateFile.py 
Log Message:
Support explicit extensions on PageTemplateFiles.


=== Releases/Zope/lib/python/Products/PageTemplates/PageTemplateFile.py 1.5 => 1.6 ===
             self._need__name__ = 0
             self.__name__ = name
-        self.filename = filename = os.path.join(_prefix, filename + '.zpt')
+        if not os.path.splitext(filename)[1]:
+            filename = filename + '.zpt'
+        self.filename = os.path.join(_prefix, filename)
 
     def pt_getContext(self):
         root = self.getPhysicalRoot()