Commit 3b5c5f3d authored by Evan Simpson's avatar Evan Simpson

Provide __name__ for constructors.

parent 4a1c11c8
......@@ -15,7 +15,7 @@
Zope object encapsulating a Page Template from the filesystem.
"""
__version__='$Revision: 1.11 $'[11:-2]
__version__='$Revision: 1.12 $'[11:-2]
import os, AccessControl, Acquisition, sys
from Globals import package_home, DevelopmentMode
......@@ -56,6 +56,8 @@ class PageTemplateFile(Script, PageTemplate, Traversable):
if name:
self._need__name__ = 0
self.__name__ = name
else:
self.__name__ = os.path.splitext(os.path.split(filename)[-1])[0]
if not os.path.splitext(filename)[1]:
filename = filename + '.zpt'
self.filename = os.path.join(_prefix, filename)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment