From cvs-admin at zope.org Tue Nov 4 14:27:17 2003 From: cvs-admin at zope.org (Evan Simpson) Date: Sun Aug 10 17:05:19 2008 Subject: [ZPT-CVS] CVS: Releases/Zope/lib/python/ZTUtils - Iterator.py:1.11 Message-ID: <200311041927.hA4JRHIg007110@cvs.zope.org> Update of /cvs-repository/Releases/Zope/lib/python/ZTUtils In directory cvs.zope.org:/tmp/cvs-serv6936/lib/python/ZTUtils Modified Files: Iterator.py Log Message: Add 'parity' method to ZTUtils Iterators. === Releases/Zope/lib/python/ZTUtils/Iterator.py 1.10 => 1.11 === --- Releases/Zope/lib/python/ZTUtils/Iterator.py:1.10 Tue Oct 21 08:21:52 2003 +++ Releases/Zope/lib/python/ZTUtils/Iterator.py Tue Nov 4 14:27:16 2003 @@ -63,6 +63,11 @@ def odd(self): return self.index % 2 + def parity(self): + if self.index % 2: + return 'odd' + return 'even' + def letter(self, base=ord('a'), radix=26): index = self.index s = '' From cvs-admin at zope.org Tue Nov 4 14:27:45 2003 From: cvs-admin at zope.org (Evan Simpson) Date: Sun Aug 10 17:05:19 2008 Subject: [ZPT-CVS] CVS: Releases/Zope/lib/python/ZTUtils - Iterator.py:1.9.42.2 Message-ID: <200311041927.hA4JRj2Z007155@cvs.zope.org> Update of /cvs-repository/Releases/Zope/lib/python/ZTUtils In directory cvs.zope.org:/tmp/cvs-serv7125/lib/python/ZTUtils Modified Files: Tag: Zope-2_7-branch Iterator.py Log Message: Add 'parity' method to ZTUtils Iterators. === Releases/Zope/lib/python/ZTUtils/Iterator.py 1.9.42.1 => 1.9.42.2 === --- Releases/Zope/lib/python/ZTUtils/Iterator.py:1.9.42.1 Tue Oct 21 08:25:50 2003 +++ Releases/Zope/lib/python/ZTUtils/Iterator.py Tue Nov 4 14:27:43 2003 @@ -63,6 +63,11 @@ def odd(self): return self.index % 2 + def parity(self): + if self.index % 2: + return 'odd' + return 'even' + def letter(self, base=ord('a'), radix=26): index = self.index s = '' From cvs-admin at zope.org Tue Nov 4 14:36:06 2003 From: cvs-admin at zope.org (Evan Simpson) Date: Sun Aug 10 17:05:19 2008 Subject: [ZPT-CVS] CVS: Releases/Zope/lib/python/Products/PageTemplates - Expressions.py:1.44 Message-ID: <200311041936.hA4Ja6bt008537@cvs.zope.org> Update of /cvs-repository/Releases/Zope/lib/python/Products/PageTemplates In directory cvs.zope.org:/tmp/cvs-serv8366/lib/python/Products/PageTemplates Modified Files: Expressions.py Log Message: Collector #1095: Allow TAL paths starting with '/varname' as a preferred spelling for 'CONTEXTS/varname'. === Releases/Zope/lib/python/Products/PageTemplates/Expressions.py 1.43 => 1.44 === --- Releases/Zope/lib/python/Products/PageTemplates/Expressions.py:1.43 Thu Sep 26 17:33:17 2002 +++ Releases/Zope/lib/python/Products/PageTemplates/Expressions.py Tue Nov 4 14:36:05 2003 @@ -115,7 +115,7 @@ def __init__(self, path): self._path = path = path.strip().split('/') self._base = base = path.pop(0) - if not _valid_name(base): + if base and not _valid_name(base): raise CompilerError, 'Invalid variable name "%s"' % base # Parse path self._dp = dp = [] @@ -140,7 +140,7 @@ # of path names. path[i:i+1] = list(val) __traceback_info__ = base = self._base - if base == 'CONTEXTS': + if base == 'CONTEXTS' or not base: ob = econtext.contexts else: ob = vars[base] From cvs-admin at zope.org Tue Nov 4 14:37:06 2003 From: cvs-admin at zope.org (Evan Simpson) Date: Sun Aug 10 17:05:19 2008 Subject: [ZPT-CVS] CVS: Releases/Zope/lib/python/Products/PageTemplates - Expressions.py:1.43.44.1 Message-ID: <200311041937.hA4Jb6NG008746@cvs.zope.org> Update of /cvs-repository/Releases/Zope/lib/python/Products/PageTemplates In directory cvs.zope.org:/tmp/cvs-serv8572/lib/python/Products/PageTemplates Modified Files: Tag: Zope-2_7-branch Expressions.py Log Message: Collector #1095: Allow TAL paths starting with '/varname' as a preferred spelling for 'CONTEXTS/varname'. === Releases/Zope/lib/python/Products/PageTemplates/Expressions.py 1.43 => 1.43.44.1 === --- Releases/Zope/lib/python/Products/PageTemplates/Expressions.py:1.43 Thu Sep 26 17:33:17 2002 +++ Releases/Zope/lib/python/Products/PageTemplates/Expressions.py Tue Nov 4 14:37:04 2003 @@ -115,7 +115,7 @@ def __init__(self, path): self._path = path = path.strip().split('/') self._base = base = path.pop(0) - if not _valid_name(base): + if base and not _valid_name(base): raise CompilerError, 'Invalid variable name "%s"' % base # Parse path self._dp = dp = [] @@ -140,7 +140,7 @@ # of path names. path[i:i+1] = list(val) __traceback_info__ = base = self._base - if base == 'CONTEXTS': + if base == 'CONTEXTS' or not base: ob = econtext.contexts else: ob = vars[base] From cvs-admin at zope.org Tue Nov 4 15:13:53 2003 From: cvs-admin at zope.org (Evan Simpson) Date: Sun Aug 10 17:05:19 2008 Subject: [ZPT-CVS] CVS: Releases/Zope/lib/python/Products/PageTemplates - PythonExpr.py:1.12 Message-ID: <200311042013.hA4KDrYP014365@cvs.zope.org> Update of /cvs-repository/Releases/Zope/lib/python/Products/PageTemplates In directory cvs.zope.org:/tmp/cvs-serv14334/lib/python/Products/PageTemplates Modified Files: PythonExpr.py Log Message: Collector #616: Make CONTEXTS available to TALES Python expressions. === Releases/Zope/lib/python/Products/PageTemplates/PythonExpr.py 1.11 => 1.12 === --- Releases/Zope/lib/python/Products/PageTemplates/PythonExpr.py:1.11 Wed Oct 9 10:40:33 2002 +++ Releases/Zope/lib/python/Products/PageTemplates/PythonExpr.py Tue Nov 4 15:13:52 2003 @@ -45,7 +45,7 @@ def _bind_used_names(self, econtext, _marker=[]): # Bind template variables - names = {} + names = {'CONTEXTS': econtext.contexts} vars = econtext.vars getType = econtext.getCompiler().getTypes().get for vname in self._f_varnames: From cvs-admin at zope.org Tue Nov 4 15:14:58 2003 From: cvs-admin at zope.org (Evan Simpson) Date: Sun Aug 10 17:05:19 2008 Subject: [ZPT-CVS] CVS: Releases/Zope/lib/python/Products/PageTemplates - PythonExpr.py:1.11.44.1 Message-ID: <200311042014.hA4KEwFj014589@cvs.zope.org> Update of /cvs-repository/Releases/Zope/lib/python/Products/PageTemplates In directory cvs.zope.org:/tmp/cvs-serv14559/lib/python/Products/PageTemplates Modified Files: Tag: Zope-2_7-branch PythonExpr.py Log Message: Collector #616: Make CONTEXTS available to TALES Python expressions. === Releases/Zope/lib/python/Products/PageTemplates/PythonExpr.py 1.11 => 1.11.44.1 === --- Releases/Zope/lib/python/Products/PageTemplates/PythonExpr.py:1.11 Wed Oct 9 10:40:33 2002 +++ Releases/Zope/lib/python/Products/PageTemplates/PythonExpr.py Tue Nov 4 15:14:57 2003 @@ -45,7 +45,7 @@ def _bind_used_names(self, econtext, _marker=[]): # Bind template variables - names = {} + names = {'CONTEXTS': econtext.contexts} vars = econtext.vars getType = econtext.getCompiler().getTypes().get for vname in self._f_varnames: From cvs-admin at zope.org Tue Nov 4 16:28:08 2003 From: cvs-admin at zope.org (Evan Simpson) Date: Sun Aug 10 17:05:19 2008 Subject: [ZPT-CVS] CVS: Releases/Zope/lib/python/TAL - markupbase.py:1.5 Message-ID: <200311042128.hA4LS8vl019570@cvs.zope.org> Update of /cvs-repository/Releases/Zope/lib/python/TAL In directory cvs.zope.org:/tmp/cvs-serv19397/lib/python/TAL Modified Files: markupbase.py Log Message: Collector #426: Inconsistent, undocumented error() method. === Releases/Zope/lib/python/TAL/markupbase.py 1.4 => 1.5 === --- Releases/Zope/lib/python/TAL/markupbase.py:1.4 Wed Sep 25 12:13:48 2002 +++ Releases/Zope/lib/python/TAL/markupbase.py Tue Nov 4 16:28:07 2003 @@ -20,6 +20,13 @@ """Return current line number and offset.""" return self.lineno, self.offset + def error(self, message): + """Return an error, showing current line number and offset. + + Concrete subclasses *must* override this method. + """ + raise NotImplementedError + # Internal -- update line number and offset. This should be # called for each piece of data exactly once, in order -- in other # words the concatenation of all the input strings to this @@ -302,4 +309,4 @@ return name.lower(), m.end() else: self.updatepos(declstartpos, i) - self.error("expected name token", self.getpos()) + self.error("expected name token") From cvs-admin at zope.org Tue Nov 4 16:28:44 2003 From: cvs-admin at zope.org (Evan Simpson) Date: Sun Aug 10 17:05:19 2008 Subject: [ZPT-CVS] CVS: Releases/Zope/lib/python/TAL - markupbase.py:1.4.44.1 Message-ID: <200311042128.hA4LSiMl019632@cvs.zope.org> Update of /cvs-repository/Releases/Zope/lib/python/TAL In directory cvs.zope.org:/tmp/cvs-serv19595/lib/python/TAL Modified Files: Tag: Zope-2_7-branch markupbase.py Log Message: Collector #426: Inconsistent, undocumented error() method. === Releases/Zope/lib/python/TAL/markupbase.py 1.4 => 1.4.44.1 === --- Releases/Zope/lib/python/TAL/markupbase.py:1.4 Wed Sep 25 12:13:48 2002 +++ Releases/Zope/lib/python/TAL/markupbase.py Tue Nov 4 16:28:42 2003 @@ -20,6 +20,13 @@ """Return current line number and offset.""" return self.lineno, self.offset + def error(self, message): + """Return an error, showing current line number and offset. + + Concrete subclasses *must* override this method. + """ + raise NotImplementedError + # Internal -- update line number and offset. This should be # called for each piece of data exactly once, in order -- in other # words the concatenation of all the input strings to this @@ -302,4 +309,4 @@ return name.lower(), m.end() else: self.updatepos(declstartpos, i) - self.error("expected name token", self.getpos()) + self.error("expected name token") From cvs-admin at zope.org Sat Nov 15 07:11:42 2003 From: cvs-admin at zope.org (Jim Fulton) Date: Sun Aug 10 17:05:19 2008 Subject: [ZPT-CVS] CVS: Zope/lib/python/Products/PageTemplates - ZopePageTemplate.py:1.46.2.1 Message-ID: <200311151211.hAFCBgwX024881@cvs.zope.org> Update of /cvs-repository/Zope/lib/python/Products/PageTemplates In directory cvs.zope.org:/tmp/cvs-serv24381/lib/python/Products/PageTemplates Modified Files: Tag: zodb33-devel-branch ZopePageTemplate.py Log Message: Changed class modification code to use setattr rather than class dictionary manipulation, since new-style class dictionaries are immutable === Zope/lib/python/Products/PageTemplates/ZopePageTemplate.py 1.46 => 1.46.2.1 === --- Zope/lib/python/Products/PageTemplates/ZopePageTemplate.py:1.46 Sat Oct 4 14:56:58 2003 +++ Zope/lib/python/Products/PageTemplates/ZopePageTemplate.py Sat Nov 15 07:11:36 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( From cvs-admin at zope.org Wed Nov 19 13:03:35 2003 From: cvs-admin at zope.org (Fred Drake) Date: Sun Aug 10 17:05:19 2008 Subject: [ZPT-CVS] CVS: Zope/lib/python/TAL/tests - test_xmlparser.py:1.7.2.1 Message-ID: <200311191803.hAJI3ZGF023549@cvs.zope.org> Update of /cvs-repository/Zope/lib/python/TAL/tests In directory cvs.zope.org:/tmp/cvs-serv23530/lib/python/TAL/tests Modified Files: Tag: Zope-2_6-branch test_xmlparser.py Log Message: Do not use unknown prefixes in XML; Expat now (properly) detects these and raises an exception. Already fixed in Zope 2.7 and the trunk. === Zope/lib/python/TAL/tests/test_xmlparser.py 1.7 => 1.7.2.1 === --- Zope/lib/python/TAL/tests/test_xmlparser.py:1.7 Thu Aug 22 15:43:08 2002 +++ Zope/lib/python/TAL/tests/test_xmlparser.py Wed Nov 19 13:03:34 2003 @@ -185,8 +185,8 @@ ]) def check_attr_funky_names(self): - self._run_check("""""", [ - ("starttag", "a", ["a.b", "v", "c:d", "v", "e-f", "v"]), + self._run_check("""""", [ + ("starttag", "a", ["a.b", "v", "e-f", "v"]), ("endtag", "a"), ]) From sdejoj0 at tiscali.co.uk Thu Nov 20 13:57:26 2003 From: sdejoj0 at tiscali.co.uk (Mother Serena Jones) Date: Sun Aug 10 17:05:19 2008 Subject: [ZPT-CVS] Remain blessed in the name of the Lord. Message-ID: From: Mrs Serena Jones PLEASE ENDEAVOUR TO USED IT FOR THE CHILDREN OF GOD. I am the above named person from Kuwait. I am married to Dr.Harry Jones who worked with Kuwait embassy in Ivory Coast for nine yearsbefore he died in the year 2000.We were married for eleven years without a child. He died after a brief illness that lasted for only four days. Before his death we were both born again Christians.Since his death I decided not to re-marry or get a child outside my matrimonial home which the Bible is against.When my late husband was alive he deposited the sum of$8.6Million (Eight Millionsix hundred thousand U.S. Dollars) with one finance/security company in Amsterderm Holland. Presently, this money is still with the Security Company. Recently, my Doctor told me that I would not last for the next three months due to cancer problem. Though what disturbs me most is my stroke sickness. Having known my condition I decided to donate this fund to church or better still a christian individual that will utilize this money the way I am going to instruct here in. I want a church that will use this fund to fund churches, orphanages and widows propagating the word of God and to ensure that the house of God is maintained. The Bible made us to understand that Blessed is the hand that giveth. I took this decision because I don't have any child that will inherit this money and my husband relatives are not Christians and I don't want my husband's hard earned money to be misused by unbelievers. I don'twant a situation where this money will be used in an ungodly manner. Hence the reason for taking this bold decision. I am not afraid of death hence I know where I am going. I know that I am going to be in the bosom of the Lord. Exodus 14 VS 14 says that the lord will fight my case and I shall hold my peace. I don't need any telephone communication in this regard because of my health because of the presence of my husband's relatives around me always. I don't want them to know about this development. With God all things are possible. As soon as I receiveyour reply I shall give you the contact of the Finance/Security Company in Amsterderm Holland. I will also issue you a letter of authority that will prove you as the original- beneficiary of this fund. I want you and the church to always pray for me because the lord is my shephard. My happiness is that I lived a life of a worthy Christian. Whoever that wants to serve the Lord must serve him in spirit and truth. Please always be prayerful all through your life. Any delay in your reply will give me room in sourcing for a chuch or christian individual for this same purpose. Please assure me that you will act accordingly as I stated herein. Hoping to hearing from you. N.B-PLEASE I WILL ADVICE YOU TO CONTACT THE LAWYER IN CHARGE IN HOLLAND IMMEDIATELY, HE DOES EVERYTHING ON MY BEHALF AND HE'S VERY UNDERSTANDING AND I BELIEVE HE WILL LEAD YOU TO YOUR SUCCESS IN JESUS NAME: Medube Ben Smith TELL: 00 31645840763 Remain blessed in the name of the Lord. Yours in Christ, Mrs Serena Jones From cvs-admin at zope.org Fri Nov 21 07:17:40 2003 From: cvs-admin at zope.org (Godefroid Chapelle) Date: Sun Aug 10 17:05:19 2008 Subject: [ZPT-CVS] CVS: Zope/lib/python/Products/PageTemplates - TALES.py:1.38.2.1 Message-ID: <200311211217.hALCHeFo011734@cvs.zope.org> Update of /cvs-repository/Zope/lib/python/Products/PageTemplates In directory cvs.zope.org:/tmp/cvs-serv11405 Modified Files: Tag: Zope-2_7-branch TALES.py Log Message: while it has been decided not to include Zope3 MessageID class support in 2.7, this two lines fix eases its integration for those who'll need it === Zope/lib/python/Products/PageTemplates/TALES.py 1.38 => 1.38.2.1 === --- Zope/lib/python/Products/PageTemplates/TALES.py:1.38 Wed May 14 17:55:14 2003 +++ Zope/lib/python/Products/PageTemplates/TALES.py Fri Nov 21 07:17:38 2003 @@ -226,7 +226,10 @@ text = self.evaluate(expr) if text is Default or text is None: return text - return ustr(text) + if isinstance(text, unicode): + return text + else: + return unicode(text) def evaluateStructure(self, expr): return self.evaluate(expr) From cvs-admin at zope.org Sat Nov 22 12:16:28 2003 From: cvs-admin at zope.org (Jim Fulton) Date: Sun Aug 10 17:05:19 2008 Subject: [ZPT-CVS] CVS: Zope/lib/python/Products/PageTemplates - PythonExpr.py:1.11.58.1 Message-ID: <200311221716.hAMHGSOp018382@cvs.zope.org> Update of /cvs-repository/Zope/lib/python/Products/PageTemplates In directory cvs.zope.org:/tmp/cvs-serv17116/lib/python/Products/PageTemplates Modified Files: Tag: zodb33-devel-branch PythonExpr.py Log Message: Implemented a new mechanism for computing roles, based on a suggestion by Dieter Maurer. === Zope/lib/python/Products/PageTemplates/PythonExpr.py 1.11 => 1.11.58.1 === --- Zope/lib/python/Products/PageTemplates/PythonExpr.py:1.11 Wed Oct 9 10:40:33 2002 +++ Zope/lib/python/Products/PageTemplates/PythonExpr.py Sat Nov 22 12:15:57 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): From cvs-admin at zope.org Tue Nov 25 15:18:11 2003 From: cvs-admin at zope.org (Jim Fulton) Date: Sun Aug 10 17:05:19 2008 Subject: [ZPT-CVS] CVS: Zope/lib/python/Products/PageTemplates - PythonExpr.py:1.12.2.1 ZopePageTemplate.py:1.47.6.1 Message-ID: <200311252018.hAPKIBGs025425@cvs.zope.org> 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( From cvs-admin at zope.org Fri Nov 28 11:45:51 2003 From: cvs-admin at zope.org (Jim Fulton) Date: Sun Aug 10 17:05:19 2008 Subject: [ZPT-CVS] CVS: Zope/lib/python/Products/PageTemplates - PythonExpr.py:1.13 Message-ID: <200311281645.hASGjpJr005036@cvs.zope.org> Update of /cvs-repository/Zope/lib/python/Products/PageTemplates In directory cvs.zope.org:/tmp/cvs-serv4998/lib/python/Products/PageTemplates Modified Files: PythonExpr.py Log Message: Removed the validateValue api. === Zope/lib/python/Products/PageTemplates/PythonExpr.py 1.12 => 1.13 === --- Zope/lib/python/Products/PageTemplates/PythonExpr.py:1.12 Tue Nov 4 15:13:52 2003 +++ Zope/lib/python/Products/PageTemplates/PythonExpr.py Fri Nov 28 11:45:50 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): From cvs-admin at zope.org Fri Nov 28 11:45:53 2003 From: cvs-admin at zope.org (Jim Fulton) Date: Sun Aug 10 17:05:19 2008 Subject: [ZPT-CVS] CVS: Zope/lib/python/Products/PageTemplates - ZopePageTemplate.py:1.48 Message-ID: <200311281645.hASGjrcA005074@cvs.zope.org> Update of /cvs-repository/Zope/lib/python/Products/PageTemplates In directory cvs.zope.org:/tmp/cvs-serv5042/lib/python/Products/PageTemplates Modified Files: ZopePageTemplate.py Log Message: Removed permission requirements for non-existent method. New-style class dictionaries are immutable. Changed some class-update code to use setattr rather thah class-dictionary modifications. === Zope/lib/python/Products/PageTemplates/ZopePageTemplate.py 1.47 => 1.48 === --- Zope/lib/python/Products/PageTemplates/ZopePageTemplate.py:1.47 Tue Oct 21 11:31:08 2003 +++ Zope/lib/python/Products/PageTemplates/ZopePageTemplate.py Fri Nov 28 11:45:52 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(