Re: [ZPT] preventing escaping of less-than and greater-thans in tal:replace

2006-08-14 Thread Charlie Clark
. Anyway I think what you're after is tal:source which is very much in the Zope Book in the chapters on PageTemplates. Charlie Charlie Clark Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-938-5360 GSM: +49-178-782-6226 ___ ZPT mailing list ZPT

Re: [ZPT] preventing escaping of less-than and greater-thans in tal:replace

2006-08-14 Thread Charlie Clark
:''; tal:replace=string:${mylt}option label='${r}' value='${id}'${mygt}${r}${mylt}/option${mygt}/span option tal:attributes=label record/name; value record/task content=record/value/option No formatting required at all. At least I think that's what you want! Charlie Charlie Clark Helmholtzstr. 20

Re: [ZPT] creating lists of objects in tal

2006-09-07 Thread Charlie Clark
them in. ZPT's run security checks on all objects which might be one reason for slowing stuff down. I suspect if you rewrite your code to use a single PythonScript then it will run a lot faster and be a lot easier to work with. Charlie -- Charlie Clark Helmholtzstr. 20 Düsseldorf D- 40215

[ZPT] Using alternatives to Zope's DateTime module in PageTemplates

2006-10-23 Thread Charlie Clark
strftime('%d.%m.%Y') currently throws a security error as neither mxDateTime nor even Python's own datetime methods are allowed by default in PageTemplates. Thanks Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source Python/Zope Consulting and Support

Re: [ZPT] Using alternatives to Zope's DateTime module in PageTemplates

2006-10-23 Thread Charlie Clark
Am 23.10.2006, 14:36 Uhr, schrieb Andreas Jung [EMAIL PROTECTED]: - lib/python/Products/PythonScripts/README.txt Exactly the same mechanism? I'll give it a try. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source Python/Zope Consulting and Support

Re: [ZPT] Using alternatives to Zope's DateTime module in PageTemplates

2006-10-23 Thread Charlie Clark
Am 23.10.2006, 14:38 Uhr, schrieb Charlie Clark [EMAIL PROTECTED]: Am 23.10.2006, 14:36 Uhr, schrieb Andreas Jung [EMAIL PROTECTED]: - lib/python/Products/PythonScripts/README.txt Exactly the same mechanism? I'll give it a try. I still have the same problem: import mx.DateTime, datetime

Re: [ZPT] Using alternatives to Zope's DateTime module in PageTemplates

2006-10-23 Thread Charlie Clark
Am 23.10.2006, 15:13 Uhr, schrieb Charlie Clark [EMAIL PROTECTED]: I still have the same problem: import mx.DateTime, datetime d1 = mx.DateTime.DateTime(2006, 10, 22) print d1 print d1.strftime(%Y.%m.%d) d2 = datetime.datetime(2006, 10, 22) print d2 print d2.strftime(%Y.%m.%d) return

Re: [ZPT] Using alternatives to Zope's DateTime module in PageTemplates

2006-10-24 Thread Charlie Clark
Am 24.10.2006, 22:26 Uhr, schrieb Dieter Maurer [EMAIL PROTECTED]: Charlie Clark wrote at 2006-10-23 16:03 +0200: ... ah, the problem seems that Python datetime returns extension types and not classes and Zope's security does not work with extension types! It does, but you need to use

Re: [ZPT] HTTP-XML input into ZPT

2006-11-01 Thread Charlie Clark
in then using a ZPT unless you wish to include this information in an existing page. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source Python/Zope Consulting and Support ...http://www.egenix.com/ mxODBC.Zope.Database.Adapter ... http

Re: [ZPT] HTTP-XML input into ZPT

2006-11-02 Thread Charlie Clark
(easiest would be a list of dictionaries) which can then be called by the PageTemplate. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source Python/Zope Consulting and Support ...http://www.egenix.com/ mxODBC.Zope.Database.Adapter ... http

Re: [ZPT] Using alternatives to Zope's DateTime module in PageTemplates

2006-11-15 Thread Charlie Clark
Am 06.11.2006, 23:12 Uhr, schrieb Dieter Maurer [EMAIL PROTECTED]: Charlie Clark wrote at 2006-10-24 22:43 +0200: Am 24.10.2006, 22:26 Uhr, schrieb Dieter Maurer [EMAIL PROTECTED]: It does, but you need to use allowType... Thanks for that. import datetime allow_type(datetime.datetime) do

Re: [ZPT] Using alternatives to Zope's DateTime module in PageTemplates

2006-11-15 Thread Charlie Clark
wrong code. Why are you surprised that I am formatting a database result? result.create_date.strftime('%d.%m.%Y') # line 31 This has been cast by psycopg to a Python datetime object which I have added as an allowed type. Charlie -- Charlie Clark eGenix.com Professional Python Services

Re: [ZPT] How to write input to a file and run a perl script

2007-04-30 Thread Charlie Clark
it lets you do. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source Python/Zope Consulting and Support ...http://www.egenix.com/ mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ mxODBC, mxDateTime, mxTextTools ...http

[ZPT] Working with encoded values in more recent versions of ZPT

2007-08-20 Thread Charlie Clark
UnicodeDecodeError for result = {'firstname':'charlie', 'surname':'Düsseldorf'} but not if Python string formatting is used tal:content tal:content=python: '%s %s' % (result['firstname'], result['surname']) / Is this the only workaround apart from decoding all return values? Charlie -- Charlie Clark

Re: [ZPT] Working with encoded values in more recent versions of ZPT

2007-08-20 Thread Charlie Clark
since then but the changelog makes no reference to ZPT. Andreas tried hard to control the inevitable string/unicode integration problems. Maybe, you read the available documentation to find out about your choices. Have the ZPT docs been updated? Charlie -- Charlie Clark eGenix.com

Re: [ZPT] Working with encoded values in more recent versions of ZPT

2007-08-20 Thread Charlie Clark
, in interpret Module zope.tal.talinterpreter, line 754, in do_insertStructure_tal UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4: ordinal not in range(128) Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source Python/Zope

Re: [ZPT] Working with encoded values in more recent versions of ZPT

2007-08-21 Thread Charlie Clark
Am 21.08.2007, 05:27 Uhr, schrieb Andreas Jung [EMAIL PROTECTED]: See http://www.zope.org/Collectors/Zope/2339 Thanks. So this means I don't need to write any additional tests? Glad to know you've resolved it. Charlie -- Charlie Clark eGenix.com Professional Python Services directly

[ZPT] ZPT encoding for non-web pages

2007-09-27 Thread Charlie Clark
the pages manually. Is there any way to change this? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source Python/Zope Consulting and Support ...http://www.egenix.com/ mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ mxODBC

Re: [ZPT] PageTemplate.pt_context signature

2008-01-16 Thread Charlie Clark
be added to the context returned by this method, just like the specified args and options parameters. This is actually described as a possible reason for subclassing in readme.txt. Not sure what you mean. Can you provide an example? Charlie -- Charlie Clark eGenix.com Professional Python