[Zope-Checkins] CVS: Zope/lib/python/Products/PageTemplates - PageTemplateFile.py:1.28
Fred L. Drake, Jr.
fred@zope.com
Tue, 22 Apr 2003 13:48:06 -0400
Update of /cvs-repository/Zope/lib/python/Products/PageTemplates
In directory cvs.zope.org:/tmp/cvs-serv4189
Modified Files:
PageTemplateFile.py
Log Message:
- add back _need__name__; it's used by InitializeClass
- normalize whitespace
=== Zope/lib/python/Products/PageTemplates/PageTemplateFile.py 1.27 => 1.28 ===
--- Zope/lib/python/Products/PageTemplates/PageTemplateFile.py:1.27 Tue Apr 22 12:27:46 2003
+++ Zope/lib/python/Products/PageTemplates/PageTemplateFile.py Tue Apr 22 13:48:05 2003
@@ -15,7 +15,7 @@
Zope object encapsulating a Page Template from the filesystem.
"""
-__version__='$Revision$'[11:-2]
+__version__ = '$Revision$'[11:-2]
import os, AccessControl
from Globals import package_home, DevelopmentMode
@@ -37,7 +37,11 @@
func_defaults = None
func_code = FuncCode((), 0)
- _v_last_read=0
+ _v_last_read = 0
+
+ # needed by App.class_init.default__class_init__, often imported
+ # using the alias Globals.InitializeClass
+ _need__name__ = 1
_default_bindings = {'name_subpath': 'traverse_subpath'}
@@ -54,6 +58,7 @@
name = kw.get('__name__')
basepath, ext = os.path.splitext(filename)
if name:
+ self._need__name__ = 0
self.__name__ = name
else:
self.__name__ = os.path.basename(basepath)