[Zope-Checkins] CVS: Zope/lib/python/Products/PageTemplates -
PythonExpr.py:1.12.2.1 ZopePageTemplate.py:1.47.6.1
Jim Fulton
cvs-admin at zope.org
Tue Nov 25 15:18:05 EST 2003
Update of /cvs-repository/Zope/lib/python/Products/PageTemplates
In directory cvs.zope.org:/tmp/cvs-serv24052/lib/python/Products/PageTemplates
Modified Files:
Tag: Zope-2_8-devel-branch
PythonExpr.py ZopePageTemplate.py
Log Message:
merged everything but ZODB and ZEO from zodb33-devel-branch
=== Zope/lib/python/Products/PageTemplates/PythonExpr.py 1.12 => 1.12.2.1 ===
--- Zope/lib/python/Products/PageTemplates/PythonExpr.py:1.12 Tue Nov 4 15:13:52 2003
+++ Zope/lib/python/Products/PageTemplates/PythonExpr.py Tue Nov 25 15:17:34 2003
@@ -23,7 +23,7 @@
'''Null security manager'''
def validate(self, *args, **kwargs):
return 1
- addContext = removeContext = validateValue = validate
+ addContext = removeContext = validate
class PythonExpr:
def __init__(self, name, expr, engine):
=== Zope/lib/python/Products/PageTemplates/ZopePageTemplate.py 1.47 => 1.47.6.1 ===
--- Zope/lib/python/Products/PageTemplates/ZopePageTemplate.py:1.47 Tue Oct 21 11:31:08 2003
+++ Zope/lib/python/Products/PageTemplates/ZopePageTemplate.py Tue Nov 25 15:17:34 2003
@@ -45,6 +45,23 @@
except ImportError:
SUPPORTS_WEBDAV_LOCKS = 0
+
+
+class Src(Acquisition.Explicit):
+ " "
+
+ PUT = document_src = Acquisition.Acquired
+ index_html = None
+
+ def __before_publishing_traverse__(self, ob, request):
+ if getattr(request, '_hacked_path', 0):
+ request._hacked_path = 0
+
+ def __call__(self, REQUEST, RESPONSE):
+ " "
+ return self.document_src(REQUEST)
+
+
class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable,
Traversable, PropertyManager):
"Zope wrapper for Page Template using TAL, TALES, and METAL"
@@ -94,7 +111,7 @@
security.declareProtected('View management screens',
'pt_editForm', 'manage_main', 'read',
'ZScriptHTML_tryForm', 'PrincipiaSearchSource',
- 'document_src', 'source.html', 'source.xml')
+ 'document_src', 'source_dot_xml')
security.declareProtected('FTP access',
'manage_FTPstat','manage_FTPget','manage_FTPlist')
@@ -104,6 +121,8 @@
pt_editForm._owner = None
manage = manage_main = pt_editForm
+ source_dot_xml = Src()
+
security.declareProtected('Change Page Templates',
'pt_editAction', 'pt_setTitle', 'pt_edit',
'pt_upload', 'pt_changePrefs')
@@ -294,24 +313,8 @@
def wl_isLocked(self):
return 0
-
-class Src(Acquisition.Explicit):
- " "
-
- PUT = document_src = Acquisition.Acquired
- index_html = None
-
- def __before_publishing_traverse__(self, ob, request):
- if getattr(request, '_hacked_path', 0):
- request._hacked_path = 0
-
- def __call__(self, REQUEST, RESPONSE):
- " "
- return self.document_src(REQUEST)
-
-d = ZopePageTemplate.__dict__
-d['source.xml'] = d['source.html'] = Src()
-
+setattr(ZopePageTemplate, 'source.xml', ZopePageTemplate.source_dot_xml)
+setattr(ZopePageTemplate, 'source.html', ZopePageTemplate.source_dot_xml)
# Product registration and Add support
manage_addPageTemplateForm = PageTemplateFile(
More information about the Zope-Checkins
mailing list