[Zope-Coders] Zope tests: 8 OK
Summary of messages to the zope-tests list. Period Thu Sep 8 11:01:02 2005 UTC to Fri Sep 9 11:01:02 2005 UTC. There were 8 messages: 8 from Zope Unit Tests. Tests passed OK --- Subject: OK : Zope-2_6-branch Python-2.1.3 : Linux From: Zope Unit Tests Date: Thu Sep 8 22:21:37 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003039.html Subject: OK : Zope-2_6-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Thu Sep 8 22:23:07 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003040.html Subject: OK : Zope-2_7-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Thu Sep 8 22:24:37 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003041.html Subject: OK : Zope-2_7-branch Python-2.4.1 : Linux From: Zope Unit Tests Date: Thu Sep 8 22:26:07 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003042.html Subject: OK : Zope-2_8-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Thu Sep 8 22:27:37 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003043.html Subject: OK : Zope-2_8-branch Python-2.4.1 : Linux From: Zope Unit Tests Date: Thu Sep 8 22:29:07 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003044.html Subject: OK : Zope-trunk Python-2.3.5 : Linux From: Zope Unit Tests Date: Thu Sep 8 22:30:37 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003045.html Subject: OK : Zope-trunk Python-2.4.1 : Linux From: Zope Unit Tests Date: Thu Sep 8 22:32:07 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003046.html ___ Zope-Coders mailing list Zope-Coders@zope.org http://mail.zope.org/mailman/listinfo/zope-coders
Re: [Zope] Using Structured Text and HTML-quote together for RSS 2.0
Jonathan Cyr wrote: I have to choose which features of Zope to learn and use, based on a much larger criteria than I can present here. I do not wish to mix ZPT and DTML in my project... I had chosen DTML, before ZPT was mature... It may be better, but I don't care for now... when I'm able to re-assess which pieces of Zope to use in a future project, I may well choose it. Okay, whatever... As a professional programmer, you must see the advantage in adhering to a project's standards and specs, as to managing the code in the project. That is why I needed to use DTML for my RSS. Uh, no, as a professional programmer, I use the best tools for the job, and don't stand by mistakes I made before, like choosing DTML, especially when the two can co-exist quite happilly... I have chosen my mix for this project, and benefit much more from my standards docs much more than any single feature like ZPT can provide. Okay, whatever... As far as I know, DTML is being supported into the future, and my hand will not be forced. Then your hand will be burned, enjoy ;-) Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] FYI on Debian 3.1/zope Re: Images too (StructuredDocument size limit reduced after 2.5.1 to 2.7.5 upgrade)
John Schinnerer wrote: That was what I needed, the parameter name...my sysadmin set it low for security reasons, not realizing Clueless overly paranoid sysadmins strike again ;-) No actually, he's very clueful and security-conscious, and I was mistaken about how it got set that low, it appears to be a debian package default setting. Ah, my mistake, clueless overly paranoid debian packagers ;-) (they're very close in breed *grinz*) Glad to hear your sysadmin doesn't fall into the former category though! FYI anyone upgrading to the recent Debian 3.1 release (sarge), the default in the config file in the zope package (2.7.5 final) in sarge has cgi-maxlen set quite low, 1 if I recall correctly, to block potential DOS attacks according to the comment on the setting (Debian is perhaps a bit paranoid in this case...). *thunks head against wall* Anyone know who the debian package maintainer is so we can give them a tickle? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] ERROR(200) KeywordIndex unindex_object could not remove documentId -702398584 from index workitems_from. This should not happen.
We are seeing traceback in the event log like this: 2005-09-09T09:28:32 ERROR(200) KeywordIndex unindex_object could not remove documentId -702398584 from index w orkitems_from. This should not happen. Traceback (most recent call last): File /home/zope/zope-2.7.4/lib/python/Products/PluginIndexes/common/UnIndex.py, line 185, in removeForward IndexEntry indexRow.remove(documentId) File /home/zope/zope-2.7.4/lib/python/ZODB/Connection.py, line 599, in setstate invalid = self._is_invalidated(obj) File /home/zope/zope-2.7.4/lib/python/ZODB/Connection.py, line 628, in _is_invalidated raise ReadConflictError(object=obj) ReadConflictError: database read conflict error (oid 0x38f00c, class BTrees.IIBTree.IISet) What is the meaning of the first line? Is it something we should worry about? (workitems_from is an index of the ZCatalog, of course).-- Icube Srlhttp://www.icube.it/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ERROR(200) KeywordIndex unindex_object could not remove documentId -702398584 from index workitems_from. This should not happen.
This is actually nothing to worry about. The error message doesn't take into account that the error it's reporting could be a conflict error (these are normal errors seen during Zope execution). The catalog probably shouldn't bother logging the error in this case. On Sep 9, 2005, at 4:16 AM, Marco Bizzarri wrote: We are seeing traceback in the event log like this: 2005-09-09T09:28:32 ERROR(200) KeywordIndex unindex_object could not remove documentId -702398584 from index w orkitems_from. This should not happen. Traceback (most recent call last): File /home/zope/zope-2.7.4/lib/python/Products/PluginIndexes/ common/UnIndex.py, line 185, in removeForward IndexEntry indexRow.remove(documentId) File /home/zope/zope-2.7.4/lib/python/ZODB/Connection.py, line 599, in setstate invalid = self._is_invalidated(obj) File /home/zope/zope-2.7.4/lib/python/ZODB/Connection.py, line 628, in _is_invalidated raise ReadConflictError(object=obj) ReadConflictError: database read conflict error (oid 0x38f00c, class BTrees.IIBTree.IISet) What is the meaning of the first line? Is it something we should worry about? (workitems_from is an index of the ZCatalog, of course). -- Icube Srl http://www.icube.it/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: FYI on Debian 3.1/zope Re: Images too (StructuredDocument size limit reduced after 2.5.1 to 2.7.5 upgrade)
Chris Withers wrote: Anyone know who the debian package maintainer is so we can give them a tickle? Just look at the zope package page on debian.org: http://packages.debian.org/zope Isa simple, no? :) Seriously though, Debian maintainers usually make reasonably sane decisions, so be gentle. Martijn Pieters ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Kupu 1.3 under zope2
Can someone please confirm that kupu 1.3 works fine under zope2? I have just installed the 1.3 tarball but I get un error in kupumacros at the following line: metal:slot define-slot=bootstrap-editor After fixing the illegal name the editor get displayed, but my test doc is not editable. If i try to edit it the kupu debug log shows the messages: 11:32:1 - Link tool initialized 11:32:1 - Image tool initialized 11:32:1 - Table tool initialized 11:32:1 - Source edit tool initialized 11:32:10 - Editor not initialized yet! Actually, uUpon inspection of the sources, it appears that the function initialize defined in KupuEditor does not get called at all. Am I missing something obvious? Thanks, __peppo ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Sql statement in dtml code
Hi all, I'm trying to basically get the output of two SELECT statements into a dtml document, but cant get it working. I've searched, and tried a few examples for similar things, but had no luck. Can anyone recommend a way, please? Thanks, Paul ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Sql statement in dtml code
I'm not sure if this is what you're looking for dtml-in expr=sql_statement(parameter1=parameter1,parameter2=parameter2) dtml-var column_name /dtml-in If no parameters, just expr=sql_statement() or dtml-in sql_statement Cheers, JB On 9 Sep 2005, at 10:50, [EMAIL PROTECTED] wrote: Hi all, I'm trying to basically get the output of two SELECT statements into a dtml document, but cant get it working. I've searched, and tried a few examples for similar things, but had no luck. Can anyone recommend a way, please? Thanks, Paul ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Sql statement in dtml code
Hi Joe, thanks for the quick reply! i've got a zsql method now(called date_count.zsql) which I try to call in my dtml via dtml-in date_count - but I get a KeyError when the page is refreshed. The dtml is in the same dir as the zsql...not sure whats up. Cheers, Paul On Fri, 2005-09-09 at 11:06 +0100, Joe Bezier wrote: I'm not sure if this is what you're looking for dtml-in expr=sql_statement(parameter1=parameter1,parameter2=parameter2) dtml-var column_name /dtml-in If no parameters, just expr=sql_statement() or dtml-in sql_statement Cheers, JB On 9 Sep 2005, at 10:50, [EMAIL PROTECTED] wrote: Hi all, I'm trying to basically get the output of two SELECT statements into a dtml document, but cant get it working. I've searched, and tried a few examples for similar things, but had no luck. Can anyone recommend a way, please? Thanks, Paul ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Sql statement in dtml code
sorry, i meant when i run the code - i'm not with zope terminology yet. here's my date_count.zsql method: select count(*) AS endcount from t_transaction and in the dtml, i've got: dtml-in date_count dtml-var endcount /dtml-in Thanks for the replies so far! Paul On Fri, 2005-09-09 at 11:30 +0100, Peter Bengtsson wrote: When the page is refreshed??? It shouldn't matter. It's got to be something wrong with the SQL statement. A ZSQL method doesn't really have an output, you have to loop over it and get the output for each key in the iterations. On 9/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Joe, thanks for the quick reply! i've got a zsql method now(called date_count.zsql) which I try to call in my dtml via dtml-in date_count - but I get a KeyError when the page is refreshed. The dtml is in the same dir as the zsql...not sure whats up. Cheers, Paul On Fri, 2005-09-09 at 11:06 +0100, Joe Bezier wrote: I'm not sure if this is what you're looking for dtml-in expr=sql_statement(parameter1=parameter1,parameter2=parameter2) dtml-var column_name /dtml-in If no parameters, just expr=sql_statement() or dtml-in sql_statement Cheers, JB On 9 Sep 2005, at 10:50, [EMAIL PROTECTED] wrote: Hi all, I'm trying to basically get the output of two SELECT statements into a dtml document, but cant get it working. I've searched, and tried a few examples for similar things, but had no luck. Can anyone recommend a way, please? Thanks, Paul ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Install latest zope on Debian Sarge?
Hello, When installing the latest zope 2.8.1 (I want to upgrade plone to 2.1) I ran into problems compiling. I quote the last rows of the output her below. How can I compile this zope on a debian sarge server? output: AccessControl/cAccessControl.c: In function `initcAccessControl': AccessControl/cAccessControl.c:2323: error: `NULL' undeclared (first use in this function) AccessControl/cAccessControl.c:2323: error: beginwaarde-element is niet constant AccessControl/cAccessControl.c:2323: error: (near initialization for `RestrictedDTMLMixinType.ob_type') error: command 'gcc' failed with exit status 1 make: *** [build] Fout 1 gcc version: gcc --version gcc (GCC) 3.3.5 (Debian 1:3.3.5-13) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Sql statement in dtml code
And this doesn't work when you refresh?? I find that hard to believe. What's the error (including traceback) On 9/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: sorry, i meant when i run the code - i'm not with zope terminology yet. here's my date_count.zsql method: select count(*) AS endcount from t_transaction and in the dtml, i've got: dtml-in date_count dtml-var endcount /dtml-in Thanks for the replies so far! Paul On Fri, 2005-09-09 at 11:30 +0100, Peter Bengtsson wrote: When the page is refreshed??? It shouldn't matter. It's got to be something wrong with the SQL statement. A ZSQL method doesn't really have an output, you have to loop over it and get the output for each key in the iterations. On 9/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Joe, thanks for the quick reply! i've got a zsql method now(called date_count.zsql) which I try to call in my dtml via dtml-in date_count - but I get a KeyError when the page is refreshed. The dtml is in the same dir as the zsql...not sure whats up. Cheers, Paul On Fri, 2005-09-09 at 11:06 +0100, Joe Bezier wrote: I'm not sure if this is what you're looking for dtml-in expr=sql_statement(parameter1=parameter1,parameter2=parameter2) dtml-var column_name /dtml-in If no parameters, just expr=sql_statement() or dtml-in sql_statement Cheers, JB On 9 Sep 2005, at 10:50, [EMAIL PROTECTED] wrote: Hi all, I'm trying to basically get the output of two SELECT statements into a dtml document, but cant get it working. I've searched, and tried a few examples for similar things, but had no luck. Can anyone recommend a way, please? Thanks, Paul ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Sql statement in dtml code
OK, are you using a Zope with an error_log? [you'll see it in the root of your installation]. If so, could you pass on the whole traceback for this error? Hang on - are you calling 'date_count' when your object's called 'date_count.zsql'? Rename your zsql method 'date_count' and then try - I think that should do it. If not, send us the traceback... Cheers JB On 9 Sep 2005, at 11:33, [EMAIL PROTECTED] wrote: sorry, i meant when i run the code - i'm not with zope terminology yet. here's my date_count.zsql method: select count(*) AS endcount from t_transaction and in the dtml, i've got: dtml-in date_count dtml-var endcount /dtml-in Thanks for the replies so far! Paul On Fri, 2005-09-09 at 11:30 +0100, Peter Bengtsson wrote: When the page is refreshed??? It shouldn't matter. It's got to be something wrong with the SQL statement. A ZSQL method doesn't really have an output, you have to loop over it and get the output for each key in the iterations. On 9/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Joe, thanks for the quick reply! i've got a zsql method now(called date_count.zsql) which I try to call in my dtml via dtml-in date_count - but I get a KeyError when the page is refreshed. The dtml is in the same dir as the zsql...not sure whats up. Cheers, Paul On Fri, 2005-09-09 at 11:06 +0100, Joe Bezier wrote: I'm not sure if this is what you're looking for dtml-in expr=sql_statement(parameter1=parameter1,parameter2=parameter2) dtml-var column_name /dtml-in If no parameters, just expr=sql_statement() or dtml-in sql_statement Cheers, JB On 9 Sep 2005, at 10:50, [EMAIL PROTECTED] wrote: Hi all, I'm trying to basically get the output of two SELECT statements into a dtml document, but cant get it working. I've searched, and tried a few examples for similar things, but had no luck. Can anyone recommend a way, please? Thanks, Paul ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Sql statement in dtml code
Hi, I've attached the two files that I'm using Full error is this: Site Error An error was encountered while publishing this resource. KeyError Sorry, a site error occurred. Traceback (innermost last): * Module ZPublisher.Publish, line 175, in publish_module_standard * Module Products.PlacelessTranslationService.PatchStringIO, line 51, in new_publish * Module ZPublisher.Publish, line 132, in publish * Module Zope.App.startup, line 204, in zpublisher_exception_hook * Module ZPublisher.Publish, line 101, in publish * Module ZPublisher.mapply, line 88, in mapply * Module ZPublisher.Publish, line 39, in call_object * Module Products.CMFCore.FSDTMLMethod, line 141, in __call__ * Module DocumentTemplate.DT_String, line 474, in __call__ * Module Products.CMFCore.FSDTMLMethod, line 134, in __call__ * Module DocumentTemplate.DT_String, line 474, in __call__ * Module DocumentTemplate.DT_In, line 623, in renderwob KeyError: 'sql_select_counts' Troubleshooting Suggestions * The URL may be incorrect. * The parameters passed to this resource may be incorrect. * A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to error log. If the error persists please contact the site maintainer. Thank you for your patience. On Fri, 2005-09-09 at 11:48 +0100, Peter Bengtsson wrote: And this doesn't work when you refresh?? I find that hard to believe. What's the error (including traceback) On 9/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: sorry, i meant when i run the code - i'm not with zope terminology yet. here's my date_count.zsql method: select count(*) AS endcount from t_transaction and in the dtml, i've got: dtml-in date_count dtml-var endcount /dtml-in Thanks for the replies so far! Paul On Fri, 2005-09-09 at 11:30 +0100, Peter Bengtsson wrote: When the page is refreshed??? It shouldn't matter. It's got to be something wrong with the SQL statement. A ZSQL method doesn't really have an output, you have to loop over it and get the output for each key in the iterations. On 9/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Joe, thanks for the quick reply! i've got a zsql method now(called date_count.zsql) which I try to call in my dtml via dtml-in date_count - but I get a KeyError when the page is refreshed. The dtml is in the same dir as the zsql...not sure whats up. Cheers, Paul On Fri, 2005-09-09 at 11:06 +0100, Joe Bezier wrote: I'm not sure if this is what you're looking for dtml-in expr=sql_statement(parameter1=parameter1,parameter2=parameter2) dtml-var column_name /dtml-in If no parameters, just expr=sql_statement() or dtml-in sql_statement Cheers, JB On 9 Sep 2005, at 10:50, [EMAIL PROTECTED] wrote: Hi all, I'm trying to basically get the output of two SELECT statements into a dtml document, but cant get it working. I've searched, and tried a few examples for similar things, but had no luck. Can anyone recommend a way, please? Thanks, Paul ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) SELECT COUNT(*) AS tcount FROM t_transaction dtml-comment Despite the name of this form (it's usually used to provide a form wrapper around a selection screen) I am using this here to provide a title to the page. /dtml-comment table width=100% tr td align=center dtml-in sql_header size=1 h1bTransactions for dtml-var PARTCODE - dtml-var KANBAN - dtml-var PARTDESCRIPTION - dtml-var CLIENTCODE/b/h1 dtml-if showvalue p align=righta href=/crocus/ui/stock/transaction?pmid=dtml-var pmiddtml-if
Re: [Zope] Sql statement in dtml code
Like Joe said, have you confused the critical difference between sql_select_counts and sql_select_counts.zsql On 9/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I've attached the two files that I'm using Full error is this: Site Error An error was encountered while publishing this resource. KeyError Sorry, a site error occurred. Traceback (innermost last): * Module ZPublisher.Publish, line 175, in publish_module_standard * Module Products.PlacelessTranslationService.PatchStringIO, line 51, in new_publish * Module ZPublisher.Publish, line 132, in publish * Module Zope.App.startup, line 204, in zpublisher_exception_hook * Module ZPublisher.Publish, line 101, in publish * Module ZPublisher.mapply, line 88, in mapply * Module ZPublisher.Publish, line 39, in call_object * Module Products.CMFCore.FSDTMLMethod, line 141, in __call__ * Module DocumentTemplate.DT_String, line 474, in __call__ * Module Products.CMFCore.FSDTMLMethod, line 134, in __call__ * Module DocumentTemplate.DT_String, line 474, in __call__ * Module DocumentTemplate.DT_In, line 623, in renderwob KeyError: 'sql_select_counts' Troubleshooting Suggestions * The URL may be incorrect. * The parameters passed to this resource may be incorrect. * A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to error log. If the error persists please contact the site maintainer. Thank you for your patience. On Fri, 2005-09-09 at 11:48 +0100, Peter Bengtsson wrote: And this doesn't work when you refresh?? I find that hard to believe. What's the error (including traceback) On 9/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: sorry, i meant when i run the code - i'm not with zope terminology yet. here's my date_count.zsql method: select count(*) AS endcount from t_transaction and in the dtml, i've got: dtml-in date_count dtml-var endcount /dtml-in Thanks for the replies so far! Paul On Fri, 2005-09-09 at 11:30 +0100, Peter Bengtsson wrote: When the page is refreshed??? It shouldn't matter. It's got to be something wrong with the SQL statement. A ZSQL method doesn't really have an output, you have to loop over it and get the output for each key in the iterations. On 9/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Joe, thanks for the quick reply! i've got a zsql method now(called date_count.zsql) which I try to call in my dtml via dtml-in date_count - but I get a KeyError when the page is refreshed. The dtml is in the same dir as the zsql...not sure whats up. Cheers, Paul On Fri, 2005-09-09 at 11:06 +0100, Joe Bezier wrote: I'm not sure if this is what you're looking for dtml-in expr=sql_statement(parameter1=parameter1,parameter2=parameter2) dtml-var column_name /dtml-in If no parameters, just expr=sql_statement() or dtml-in sql_statement Cheers, JB On 9 Sep 2005, at 10:50, [EMAIL PROTECTED] wrote: Hi all, I'm trying to basically get the output of two SELECT statements into a dtml document, but cant get it working. I've searched, and tried a few examples for similar things, but had no luck. Can anyone recommend a way, please? Thanks, Paul ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope **
Re: [Zope] Sql statement in dtml code
Ok, I've made a few changes, and now I get this error: Site Error An error was encountered while publishing this resource. AttributeError Sorry, a site error occurred. Traceback (innermost last): * Module ZPublisher.Publish, line 175, in publish_module_standard * Module Products.PlacelessTranslationService.PatchStringIO, line 51, in new_publish * Module ZPublisher.Publish, line 132, in publish * Module Zope.App.startup, line 204, in zpublisher_exception_hook * Module ZPublisher.Publish, line 101, in publish * Module ZPublisher.mapply, line 88, in mapply * Module ZPublisher.Publish, line 39, in call_object * Module Products.CMFCore.FSDTMLMethod, line 141, in __call__ * Module DocumentTemplate.DT_String, line 474, in __call__ * Module Products.CMFCore.FSDTMLMethod, line 134, in __call__ * Module DocumentTemplate.DT_String, line 474, in __call__ * Module DocumentTemplate.DT_In, line 676, in renderwob * Module AccessControl.ImplPython, line 164, in guarded_getitem * Module AccessControl.ZopeGuards, line 67, in guarded_getitem AttributeError: __getitem__ On Fri, 2005-09-09 at 11:55 +0100, Peter Bengtsson wrote: Like Joe said, have you confused the critical difference between sql_select_counts and sql_select_counts.zsql On 9/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I've attached the two files that I'm using Full error is this: Site Error An error was encountered while publishing this resource. KeyError Sorry, a site error occurred. Traceback (innermost last): * Module ZPublisher.Publish, line 175, in publish_module_standard * Module Products.PlacelessTranslationService.PatchStringIO, line 51, in new_publish * Module ZPublisher.Publish, line 132, in publish * Module Zope.App.startup, line 204, in zpublisher_exception_hook * Module ZPublisher.Publish, line 101, in publish * Module ZPublisher.mapply, line 88, in mapply * Module ZPublisher.Publish, line 39, in call_object * Module Products.CMFCore.FSDTMLMethod, line 141, in __call__ * Module DocumentTemplate.DT_String, line 474, in __call__ * Module Products.CMFCore.FSDTMLMethod, line 134, in __call__ * Module DocumentTemplate.DT_String, line 474, in __call__ * Module DocumentTemplate.DT_In, line 623, in renderwob KeyError: 'sql_select_counts' Troubleshooting Suggestions * The URL may be incorrect. * The parameters passed to this resource may be incorrect. * A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to error log. If the error persists please contact the site maintainer. Thank you for your patience. On Fri, 2005-09-09 at 11:48 +0100, Peter Bengtsson wrote: And this doesn't work when you refresh?? I find that hard to believe. What's the error (including traceback) On 9/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: sorry, i meant when i run the code - i'm not with zope terminology yet. here's my date_count.zsql method: select count(*) AS endcount from t_transaction and in the dtml, i've got: dtml-in date_count dtml-var endcount /dtml-in Thanks for the replies so far! Paul On Fri, 2005-09-09 at 11:30 +0100, Peter Bengtsson wrote: When the page is refreshed??? It shouldn't matter. It's got to be something wrong with the SQL statement. A ZSQL method doesn't really have an output, you have to loop over it and get the output for each key in the iterations. On 9/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Joe, thanks for the quick reply! i've got a zsql method now(called date_count.zsql) which I try to call in my dtml via dtml-in date_count - but I get a KeyError when the page is refreshed. The dtml is in the same dir as the zsql...not sure whats up. Cheers, Paul On Fri, 2005-09-09 at 11:06 +0100, Joe Bezier wrote: I'm not sure if this is what you're looking for dtml-in expr=sql_statement(parameter1=parameter1,parameter2=parameter2) dtml-var column_name /dtml-in If no parameters, just expr=sql_statement() or dtml-in sql_statement Cheers, JB On 9 Sep 2005, at 10:50, [EMAIL PROTECTED] wrote: Hi all, I'm trying to basically get the output of two SELECT statements into
[Zope] Re: Using Structured Text and HTML-quote together for RSS 2.0
Jonathan Cyr wrote: That's the ticket. You're right the CDATA solution is much better than html-quote'ing everything. Many thanks, -Jon Peter Bengtsson wrote: Create a python script called rssFormatter(text):: from Products.PythonScripts.standard import structured_text, html_quote return html_quote(structured_text(text)) Which you use later as dtml-var rssFormatter(summary) I think for some of my RSS feeds I use CDATA, so _my_ rssFormatter() script looks something like this:: return ![CDATA[%s]] % text The advantage with CDATA is that you won't need to html quote things. Which is not really true, you still have to find a way to deal with your string if it contains ']]' which is the end marker for CDATA. Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of RD +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: ERROR(200) KeywordIndex unindex_object could not remove documentId -702398584 from index workitems_from. This should not happen.
Marco Bizzarri wrote: We are seeing traceback in the event log like this: 2005-09-09T09:28:32 ERROR(200) KeywordIndex unindex_object could not remove documentId -702398584 from index w orkitems_from. This should not happen. Traceback (most recent call last): File /home/zope/zope-2.7.4/lib/python/Products/PluginIndexes/common/UnIndex.py, line 185, in removeForward IndexEntry indexRow.remove(documentId) File /home/zope/zope-2.7.4/lib/python/ZODB/Connection.py, line 599, in setstate invalid = self._is_invalidated(obj) File /home/zope/zope-2.7.4/lib/python/ZODB/Connection.py, line 628, in _is_invalidated raise ReadConflictError(object=obj) ReadConflictError: database read conflict error (oid 0x38f00c, class BTrees.IIBTree.IISet) What is the meaning of the first line? Is it something we should worry about? (workitems_from is an index of the ZCatalog, of course). This spurious error message has been fixed in Zope 2.7.7 last July (http://www.zope.org/Collectors/Zope/1832). Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of RD +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Sql statement in dtml code
Try to locate what causes this error by commenting things out one by one. Eventually you'll be able to locate the culprit which someone on the list might be able to help you with. On 9/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Ok, I've made a few changes, and now I get this error: Site Error An error was encountered while publishing this resource. AttributeError Sorry, a site error occurred. Traceback (innermost last): * Module ZPublisher.Publish, line 175, in publish_module_standard * Module Products.PlacelessTranslationService.PatchStringIO, line 51, in new_publish * Module ZPublisher.Publish, line 132, in publish * Module Zope.App.startup, line 204, in zpublisher_exception_hook * Module ZPublisher.Publish, line 101, in publish * Module ZPublisher.mapply, line 88, in mapply * Module ZPublisher.Publish, line 39, in call_object * Module Products.CMFCore.FSDTMLMethod, line 141, in __call__ * Module DocumentTemplate.DT_String, line 474, in __call__ * Module Products.CMFCore.FSDTMLMethod, line 134, in __call__ * Module DocumentTemplate.DT_String, line 474, in __call__ * Module DocumentTemplate.DT_In, line 676, in renderwob * Module AccessControl.ImplPython, line 164, in guarded_getitem * Module AccessControl.ZopeGuards, line 67, in guarded_getitem AttributeError: __getitem__ On Fri, 2005-09-09 at 11:55 +0100, Peter Bengtsson wrote: Like Joe said, have you confused the critical difference between sql_select_counts and sql_select_counts.zsql On 9/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I've attached the two files that I'm using Full error is this: Site Error An error was encountered while publishing this resource. KeyError Sorry, a site error occurred. Traceback (innermost last): * Module ZPublisher.Publish, line 175, in publish_module_standard * Module Products.PlacelessTranslationService.PatchStringIO, line 51, in new_publish * Module ZPublisher.Publish, line 132, in publish * Module Zope.App.startup, line 204, in zpublisher_exception_hook * Module ZPublisher.Publish, line 101, in publish * Module ZPublisher.mapply, line 88, in mapply * Module ZPublisher.Publish, line 39, in call_object * Module Products.CMFCore.FSDTMLMethod, line 141, in __call__ * Module DocumentTemplate.DT_String, line 474, in __call__ * Module Products.CMFCore.FSDTMLMethod, line 134, in __call__ * Module DocumentTemplate.DT_String, line 474, in __call__ * Module DocumentTemplate.DT_In, line 623, in renderwob KeyError: 'sql_select_counts' Troubleshooting Suggestions * The URL may be incorrect. * The parameters passed to this resource may be incorrect. * A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to error log. If the error persists please contact the site maintainer. Thank you for your patience. On Fri, 2005-09-09 at 11:48 +0100, Peter Bengtsson wrote: And this doesn't work when you refresh?? I find that hard to believe. What's the error (including traceback) On 9/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: sorry, i meant when i run the code - i'm not with zope terminology yet. here's my date_count.zsql method: select count(*) AS endcount from t_transaction and in the dtml, i've got: dtml-in date_count dtml-var endcount /dtml-in Thanks for the replies so far! Paul On Fri, 2005-09-09 at 11:30 +0100, Peter Bengtsson wrote: When the page is refreshed??? It shouldn't matter. It's got to be something wrong with the SQL statement. A ZSQL method doesn't really have an output, you have to loop over it and get the output for each key in the iterations. On 9/9/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Joe, thanks for the quick reply! i've got a zsql method now(called date_count.zsql) which I try to call in my dtml via dtml-in date_count - but I get a KeyError when the page is refreshed. The dtml is in the same dir as the zsql...not sure whats up. Cheers, Paul On Fri, 2005-09-09 at 11:06 +0100, Joe Bezier wrote: I'm not sure if this is what you're looking for dtml-in
Re: [Zope] Re: Using Structured Text and HTML-quote together for RSS 2.0
I think for some of my RSS feeds I use CDATA, so _my_ rssFormatter() script looks something like this:: return ![CDATA[%s]] % text The advantage with CDATA is that you won't need to html quote things. Which is not really true, you still have to find a way to deal with your string if it contains ']]' which is the end marker for CDATA. I'm assuming this would work:: return ![CDATA[%s]] % text.replace('[[','\[\[\') Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of RD +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Character set problems
I will let you know...but it was slightly off in the specs I gave. It was a 2.7.0 on RH9 and new install is 2.7.7 on RHE4. If I take the offending text, cut and paste, and put on a different install of 2.7.5 on RHE4 then the encoding works fine and the characters show fine. Mainly bullets, apostrophes and quotes copied from a Word doc and pasted in as text to a dtml document. I changed the LANG encoding for the zope user that zope runs as. But did not change the root LANG encoding. If zope runs as zope does it START as zope or as root? (Linux novice here if you could not tell already) This did not seem to make a difference. Only thing I can see at this point is the difference in zope version. Nik - I will let you know if I do find out anything. Allen Niklas Saers wrote: Hi Allen, I'm trying out the zope.conf solution proposed. Will you let me know if you make progress here? Cheers Nik On 9/8/05, Allen Schmidt [EMAIL PROTECTED] wrote: What timing. I am going through something similar. Had a zope 2.7.0 instance on RH9..not sure of the python. Had a bunch customer sites in it using VHM. Nothing in front of the zope. (I know) Moved to a new server, RHE4, Zope 2.7.5 on Python 2.3.5 Just moved the Data.fs and moved products and restarted. Perfect. Now one customer says they are seeing question marks in places where bullets and apostrophes, etc. should be. Looking at the encoding the browser picks up and it always goes to UTF-8. If I manually switch it to Western ISO the page looks fine. Where does this get set? In Linux? In Python? In Zope? ...and if so, where exactly and how to change it? Any help appreciated. Allen Peter Bengtsson wrote: Set the locale on the Zope installation in zope.conf If you're unsure about your code, try this $ set | grep LANG On 9/8/05, Niklas Saers [EMAIL PROTECTED] wrote: Hey guys, I've installed Zope on a FreeBSD server. My problem domain is very small: display a list of when people are unavailable, and let people update the list. This is all in Danish, and here are come my problems. Danish has three extra letters not in the ASCII alfabet, three upper-case and three lower-case. When getting the data from a input name=test / where I've written æ ø å Æ Ø Å, I get: æ ø Ã¥ Æ Ø Ã… What is the standard way of ensuring that I get the correct data? I tried writing a little converter, but the string tekst = tekst.replace(\xc3\xa6, ae); gives me the error UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128) Do you have any suggestion on how to overcome these problems? Cheers Nik ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Character set problems
I assume you use Firefox. Go to the two pages; the one that works and the one that doesn't. Right-click and select Vew Page Info. Look at what it says on Encoding On 9/9/05, Allen Schmidt [EMAIL PROTECTED] wrote: I will let you know...but it was slightly off in the specs I gave. It was a 2.7.0 on RH9 and new install is 2.7.7 on RHE4. If I take the offending text, cut and paste, and put on a different install of 2.7.5 on RHE4 then the encoding works fine and the characters show fine. Mainly bullets, apostrophes and quotes copied from a Word doc and pasted in as text to a dtml document. I changed the LANG encoding for the zope user that zope runs as. But did not change the root LANG encoding. If zope runs as zope does it START as zope or as root? (Linux novice here if you could not tell already) This did not seem to make a difference. Only thing I can see at this point is the difference in zope version. Nik - I will let you know if I do find out anything. Allen Niklas Saers wrote: Hi Allen, I'm trying out the zope.conf solution proposed. Will you let me know if you make progress here? Cheers Nik On 9/8/05, Allen Schmidt [EMAIL PROTECTED] wrote: What timing. I am going through something similar. Had a zope 2.7.0 instance on RH9..not sure of the python. Had a bunch customer sites in it using VHM. Nothing in front of the zope. (I know) Moved to a new server, RHE4, Zope 2.7.5 on Python 2.3.5 Just moved the Data.fs and moved products and restarted. Perfect. Now one customer says they are seeing question marks in places where bullets and apostrophes, etc. should be. Looking at the encoding the browser picks up and it always goes to UTF-8. If I manually switch it to Western ISO the page looks fine. Where does this get set? In Linux? In Python? In Zope? ...and if so, where exactly and how to change it? Any help appreciated. Allen Peter Bengtsson wrote: Set the locale on the Zope installation in zope.conf If you're unsure about your code, try this $ set | grep LANG On 9/8/05, Niklas Saers [EMAIL PROTECTED] wrote: Hey guys, I've installed Zope on a FreeBSD server. My problem domain is very small: display a list of when people are unavailable, and let people update the list. This is all in Danish, and here are come my problems. Danish has three extra letters not in the ASCII alfabet, three upper-case and three lower-case. When getting the data from a input name=test / where I've written æ ø å Æ Ø Å, I get: æ ø Ã¥ Æ Ø Ã… What is the standard way of ensuring that I get the correct data? I tried writing a little converter, but the string tekst = tekst.replace(\xc3\xa6, ae); gives me the error UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128) Do you have any suggestion on how to overcome these problems? Cheers Nik ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Character set problems
Hmmm... so the page setting on both zope versions is utf-8 but on the new zope, the text is actually shown with Western encoding. Warning! I'm no unicode expert at all. I live and work in the UK :) On 9/9/05, Allen Schmidt [EMAIL PROTECTED] wrote: Firefox, Netscape and IE all show the same UTF-8 encoding not matter what I do. But if I choose Western manually the characters show fine. Copy the same text out of the document and paste into a page on 2.7.5 and the encoding is Western. Thanks -Allen Peter Bengtsson wrote: I assume you use Firefox. Go to the two pages; the one that works and the one that doesn't. Right-click and select Vew Page Info. Look at what it says on Encoding On 9/9/05, Allen Schmidt [EMAIL PROTECTED] wrote: I will let you know...but it was slightly off in the specs I gave. It was a 2.7.0 on RH9 and new install is 2.7.7 on RHE4. If I take the offending text, cut and paste, and put on a different install of 2.7.5 on RHE4 then the encoding works fine and the characters show fine. Mainly bullets, apostrophes and quotes copied from a Word doc and pasted in as text to a dtml document. I changed the LANG encoding for the zope user that zope runs as. But did not change the root LANG encoding. If zope runs as zope does it START as zope or as root? (Linux novice here if you could not tell already) This did not seem to make a difference. Only thing I can see at this point is the difference in zope version. Nik - I will let you know if I do find out anything. Allen On 9/8/05, Allen Schmidt [EMAIL PROTECTED] wrote: What timing. I am going through something similar. Had a zope 2.7.0 instance on RH9..not sure of the python. Had a bunch customer sites in it using VHM. Nothing in front of the zope. (I know) Moved to a new server, RHE4, Zope 2.7.5 on Python 2.3.5 Just moved the Data.fs and moved products and restarted. Perfect. Now one customer says they are seeing question marks in places where bullets and apostrophes, etc. should be. Looking at the encoding the browser picks up and it always goes to UTF-8. If I manually switch it to Western ISO the page looks fine. Where does this get set? In Linux? In Python? In Zope? ...and if so, where exactly and how to change it? Any help appreciated. Allen Peter Bengtsson wrote: Set the locale on the Zope installation in zope.conf If you're unsure about your code, try this $ set | grep LANG -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Zope Job in Athens, Greece
Hello Zope-World! We have a job offer for someone with good experience on handcrafted HTML and CSS, working on Zope projects. Knowledge of Zope can be acquired on the job, but we want good HTML/CSS that can be mixed in with ZPT. This is not a job for someone with years of knowledge of Zope already. But if you know a bit of Zope or are interested to learn about it and have the mentioned HTML/CSS background and a rough idea what building a web application is, then this may be for you. The job is in Athens, Greece. Yes, that's where the sun is shining and the sea is only a short ride away. You can take weekend trips to islands other people see only on postcards. And we get to eat fresh fish on business lunches :-) Telecommuting to other countries is *not* available for this position, as you would get cheated out of the fresh fish. We are a small to medium advertising company, with a robust business background. We are developing tools for providing more benefits and improving communication with our clients. Right now it's me as a Zope dev, next month we will have another Zope newby starting, and then we want you. If you are in Greece, this is obviously for your. If you are outside Greece (in EU), please note that Greece is not a high salary country, but a country with high quality of life. It might be interesting for you if you are the adventurous type. Speaking Greek would be nice, but we also do business in English. Please send your CV to me, not to the list! :-) Regards, Sascha ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Character set problems
Hi Here are some things you can do to handle your problem. For me, this approach worked just fine. 1. Your HTML pages must have set the encoding to utf-8. Put this in the HEAD tag of your html pages: meta http-equiv=Content-Type content=text/html; charset=utf-8 / 2. For the Root folder add a property named 'management_page_charset' of type 'string' with the value 'utf-8'. In this way the ZMI pages will be displayed with utf-8 encoding. 3. Modify your HTML code like this: input name=test:utf8:ustring / If 'test' is also a property of some object, make sure it has 'ustring' type. After that the value will be displayed correctly in all pages. Note: If your Zope runs over an Apache you must check also the Apache settings (to serve pages utf-8 encoded) Hope this will help. Regards, Dragos Niklas Saers wrote: Hey guys, I've installed Zope on a FreeBSD server. My problem domain is very small: display a list of when people are unavailable, and let people update the list. This is all in Danish, and here are come my problems. Danish has three extra letters not in the ASCII alfabet, three upper-case and three lower-case. When getting the data from a input name=test / where I've written æ ø å Æ Ø Å, I get: æ ø Ã¥ Æ Ø Ã… What is the standard way of ensuring that I get the correct data? I tried writing a little converter, but the string tekst = tekst.replace(\xc3\xa6, ae); gives me the error *UnicodeDecodeError: **'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)* Do you have any suggestion on how to overcome these problems? Cheers Nik ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Same product in multiple instances automatically?
I'm running multiple instances of Zope 2.7.7 on a FreeBSD server. Each of those instances uses the same products, which I handle by making symlinks from the site's Products directory to that instance's Products directory: [1] /usr/local/www/Zope/Products/ZPsycopgDA [2] /usr/local/www/Zope/Products/exUserFolder /usr/local/www/Zope/instance1/Products/ZPsycopgDA - [1] /usr/local/www/Zope/instance1/Products/exUserFolder - [2] /usr/local/www/Zope/instance2/Products/ZPsycopgDA - [1] /usr/local/www/Zope/instance2/Products/exUserFolder - [2] ... To be honest, I'd expect something a little different, namely that each instance would automatically pull in all the products in the site installation (like [1] and [2] above), but that doesn't seem to be the case. Is that a configuration issue, by design, or by accident? It's not that I mind making a symlink here or there, but it's one more thing to remember when making a new instance and just feels wrong. -- Kirk Strauser The Day Companies ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Same product in multiple instances automatically?
To be honest, I'd expect something a little different, namely that each instance would automatically pull in all the products in the site installation (like [1] and [2] above), but that doesn't seem to be the case. Is that a configuration issue, by design, or by accident? It's a configuration issue. Check out the products directive in zope.conf. -PW ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] How to create a folder in a just created folder using a python script.
Hello, In a python script I use teh following line to create a folder: context.manage_addProduct['OFSP'].manage_addFolder(Unique, title=field_titel) Unique is a unique ID. How can I create to folder is this folder in the same script ? regards, Martin Koekenberg ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Same product in multiple instances automatically?
On Friday 09 September 2005 10:25, Paul Winkler wrote: To be honest, I'd expect something a little different, namely that each instance would automatically pull in all the products in the site installation (like [1] and [2] above), but that doesn't seem to be the case. Is that a configuration issue, by design, or by accident? It's a configuration issue. Check out the products directive in zope.conf. The one that says: The master Products directory exists in Zope's software home, and cannot be removed from the products path (and should not be added to it here). ? That seemed to me that I shouldn't be adding /usr/local/www/Zope/Products to the search path, although I'm unsure of the reasons. -- Kirk Strauser The Day Companies ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How to create a folder in a just created folder using a python script.
id1 = something id2 = else context.manage_addFolder(id1, George Bush) getattr(context, id1).manage_addFolder(id2, George W. Bush) On 9/9/05, Martin Koekenberg [EMAIL PROTECTED] wrote: Hello, In a python script I use teh following line to create a folder: context.manage_addProduct['OFSP'].manage_addFolder(Unique, title=field_titel) Unique is a unique ID. How can I create to folder is this folder in the same script ? regards, Martin Koekenberg ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Caching ImageFiles
Peter Bengtsson wrote at 2005-9-8 17:23 +0100: ... What is the difference between 'Cache-Control' and 'Expires'? Cache control is the modern (HTTP 1.1) way, Expires the old (HTTP 1.0) one. What is best to use and for what? Use them both: HTTP 1.1 clients will honour Cache-Control (which is easier to use and much more flexible). HTTP 1.0 clients will ignore Cache-Control but honour Expires. With Expires you get thus at least a bit control for these old clients. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How to create a folder in a just created folder using a python script.
Martin Koekenberg wrote at 2005-9-9 17:48 +0200: ... In a python script I use teh following line to create a folder: context.manage_addProduct['OFSP'].manage_addFolder(Unique, title=field_titel) Unique is a unique ID. How can I create to folder is this folder in the same script ? You fetch the newly created object with: newly_created_object = getattr(context, Unique) and apply the same procedure as above for newly_created_object in place of context. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Install latest zope on Debian Sarge?
johnny wrote at 2005-9-9 12:11 +0200: ... How can I compile this zope on a debian sarge server? We have successfully compiled Zope (from source) on Debian Sarge. You must have a strangely screwed up system. output: AccessControl/cAccessControl.c: In function `initcAccessControl': AccessControl/cAccessControl.c:2323: error: `NULL' undeclared (first use in this function) NULL is usually defined in stdlib.h. It looks as if either your gcc found wrong include files (at wrong places with wrong content) or the include files (at the correct places) have been corrupted. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ERROR(200) KeywordIndex unindex_object could not remove documentId -702398584 from index workitems_from. This should not happen.
Marco Bizzarri wrote at 2005-9-9 10:16 +0200: We are seeing traceback in the event log like this: There are more bugs in KeywordIndex (as someone else noted, this one has been fixed recently). You may consider my ManagableIndex and its KeywordIndex. It has less bugs than the Zope one -- and should you find one, the fix will almost surely be much quicker than for Zope indexes ;-) http://www.dieter.handshake.de/pyprojects/zope -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Character set problems
Niklas Saers wrote at 2005-9-8 18:59 +0200: ... What is the standard way of ensuring that I get the correct data? I tried writing a little converter, but the string tekst = tekst.replace(\xc3\xa6, ae); gives me the error *UnicodeDecodeError: **'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)* Apparently, tekst contains a unicode string. Mixing unicode and non-unicode (as you do above) is tricky in Python (avoid it, if you can). If you know that all non-unicode text uses the same encoding, you can set Python's default encoding. It can be set with sys.setdefaultencoding(encoding) -- but only during startup (usually in sitecustomize.py). Whenever, unicode and non-unicode come together, Python uses its default encoding to convert the non-unicode to unicode. If you do nothing, the default encoding is ascii -- resulting in the above error. The ideal way would be to have all your data and templates unicode and let ZPublisher (more precisely ZPublisher.HTTPResponse.HTTPResponse) convert to the output encoding (defined via the charset parameter of the Content-Type response header). Unfortunately, only few parts of Zope are already fully unicode aware: actually, only XML PageTemplates, but neither HTML PageTemplates not Python Scripts. This will change with Zope 3. Up to that time, you can live with either setting Python's default encoding or converting unicode explicitly to your encoding as soon as you get it. In either case, you *MUST* declare the encoding you are using in the charset parameter of the Content-Type response header. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Map LDAP schema attributes to group
I'd like the best of both worlds. I'm currently running Python 2.3.5, Zope 2.7.7, and Plone 2.1 (final). Using LDAPUserFolder (2.5beta2) as the authentication method and it works perfectly. I'm using LDAPUF as the User Source and User Folder as the Groups Source. It's better for us to manage groups in Plone. But I'd like a little of the information in Active Directory to help with some blanket permissions. What I have is a folder that contains folders and files that need to be viewed by some personnel of the organization, but not others. For this, I've created a role called 'Reader' (Reader gets viewing permissions only). I create a group that I want to view folder A. At the local level, I assign this group the role 'Reader'. This will work fine, but I have to manually manage each group. What I'd like to do is use some of the LDAP schema attributes to act as a condition of permissionship. I can use this to create a portal tab: Title MOD Report 5 Id folderContent URL string:${portal_url}/corporate-reports/operations-reports/ Condition python: 'CN=MOD Report,CN=Users' in portal.portal_membership.getAuthenticatedMember().getProperty(memberOf) Permission View Categoryportal_tabs Visible?checked This correctly creates the portal tab because the condition in this case is true. But because this member isn't a member of the group that is allowed to view the URL, when I click on the tab I get Insufficient Privileges. I was hoping there was a way that I could use this Property to map this member to a particular group. That way everyone that has memberOf - MOD Report in Active Directory would automagically be a member of said group. I've tried creating an action like this in portal_memberships and portal_groups, trying things like Category - global,folder and user but to no avail. Does anyone know how I can bind this Member Property to a Group without using LDAPUF as the Group Source? BTW, I don't want to create a portal tab for each permissioned folder. I just want to map to the group. Peppi Vecchio | Web Developer TECHNOLOGY SERVICES GROUP _ The information contained in this message is privileged, confidential and intended only for use of the individual or entity addressed above. If you have received this communication in error, please immediately notify us by reply and delete the same. Thank you. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Same product in multiple instances automatically?
Kirk Strauser wrote: On Friday 09 September 2005 10:25, Paul Winkler wrote: To be honest, I'd expect something a little different, namely that each instance would automatically pull in all the products in the site installation (like [1] and [2] above), but that doesn't seem to be the case. Is that a configuration issue, by design, or by accident? It's a configuration issue. Check out the products directive in zope.conf. The one that says: The master Products directory exists in Zope's software home, and cannot be removed from the products path (and should not be added to it here). ? That seemed to me that I shouldn't be adding /usr/local/www/Zope/Products to the search path, although I'm unsure of the reasons. I don't know why, either. That simply says that there is a default Products directory ($SOFTWARE_HOME/lib/python/Products), you can't get rid of it, and you shouldn't try to configure it here. The more interesting part is:: Name of a directory that contains additional Product packages. This directive may be used as many times as needed to add additional collections of products. Each directory identified will be added to the __path__ of the Products package. If you want your instances to use Products from some other directory, name it here. --jcc -- Building Websites with Plone http://plonebook.packtpub.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Zope 2.8.1 won't make
Just downloaded Zope 2.8.1 and I'm trying to install it on MOSX 10.4, which has XCode 2.1 installed. I'm following installation instructions on this page: http://www.plope.com/Books/2_7Edition/InstallingZope.stx#2-6 ./configure runs, but when I try to make, I get this error: makefile:54: *** target pattern contains no `%'. Stop. This happens regardless of the python or prefix I use as arguments when I configure. I've used Python 2.3.5 which comes with MOXS 10.4, and I've used Python 2.3.5 as installed by Fink. I don't understand what this error means. Any ideas, anyone? Thanks in advance. SG __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Using Structured Text and HTML-quote together for RSS 2.0
A ha... thanks for the tip. -Jon Florent Guillaume wrote: Jonathan Cyr wrote: That's the ticket. You're right the CDATA solution is much better than html-quote'ing everything. Many thanks, -Jon Peter Bengtsson wrote: Create a python script called rssFormatter(text):: from Products.PythonScripts.standard import structured_text, html_quote return html_quote(structured_text(text)) Which you use later as dtml-var "rssFormatter(summary)" I think for some of my RSS feeds I use CDATA, so _my_ rssFormatter() script looks something like this:: return "![CDATA[%s]]" % text The advantage with CDATA is that you won't need to html quote things. Which is not really true, you still have to find a way to deal with your string if it contains ']]' which is the end marker for CDATA. Florent -- Jonathan Cyr [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Same product in multiple instances automatically?
JCC wrote: If you want your instances to use Products from some other directory, name it here. The one possible gotcha, dating back to the Zope 2.6.x / CMF 1.3.x days, is that CMF (and Plone) would not work properly if installed somewhere other than $INSTANCE_HOME/Products. The skins directories wouldn't work for some reason having to do with DirectoryView.py. I don't remember the details and hopefully this has been fixed since then; I haven't tried that particular scenario in a looong time. -PW ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Using Structured Text and HTML-quote together for RSS 2.0
Dude, I appreciate the amount of effort that you contribute to the community... but that said... you really are quite rude and obnoxious hence the "Go easy" warning. Your skills in dealing with people pale in comparison to your Zope prowess. Talking down to people doesn't build community... no matter how right you are. Building a community isn't about code, or rightousness... it's about people... consider the effects of your tone on this list. If you need to be right that badly, have at it You're right, DTML sucks, ZPT and whatever else is the obvious solution... my issue is solved... thank you so much for your time. Bait taken, with apologies to all, -Jon Chris Withers wrote: Jonathan Cyr wrote: I have to choose which features of Zope to learn and use, based on a much larger criteria than I can present here. I do not wish to mix ZPT and DTML in my project... I had chosen DTML, before ZPT was mature... It may be better, but I don't care for now... when I'm able to re-assess which pieces of Zope to use in a future project, I may well choose it. Okay, whatever... As a professional programmer, you must see the advantage in adhering to a project's standards and specs, as to managing the code in the project. That is why I needed to use DTML for my RSS. Uh, no, as a professional programmer, I use the best tools for the job, and don't stand by mistakes I made before, like choosing DTML, especially when the two can co-exist quite happilly... I have chosen my mix for this project, and benefit much more from my standards docs much more than any single feature like ZPT can provide. Okay, whatever... As far as I know, DTML is being supported into the future, and my hand will not be forced. Then your hand will be burned, enjoy ;-) Chris -- Jonathan Cyr [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Testing arguments in zsql methods
Hi everyone, I have what I think is a banal question here... Is there any way I can test inside a zsql method if an argument has been passed? dtml-if foo won't work because 0 (zero) is an expected value. Have tried dtml-if _.hasattr(_, 'foo') but it seems to be always false (where's that namespace?) TIA, Pablo ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Using Structured Text and HTML-quote together for RSS 2.0
Hi Peter, Happy to have the choice, don't get me wrong. I found DTML very easy, I'm old school and generate all of my HTML/CSS by hand. In addition to CSS, I've found it pretty good for inserting items into _javascript_, Applet and Embed elements. I find that I'm attuned to a tag system that jumps out at me when reading The ZPT stuff wasn't as easy to parse visually for me but if you're a Dreamweaver user or something, I'm sure its a godsend. I can move quite fast in DTML, and my ability to parse it visually is key in my productivity. Funny, I bought Zope's approach "hook, line sinker", early on, with the various Zope books published with DTML being a major piece of the Zope puzzle. DTML made sense to me then, still does. -Jon Peter Bengtsson wrote: Chris was merely suggesting. Technically ZPT is probably a better choice but DTML is pretty good too. On many of my projects that I started a longer time ago the less important templates were written in DTML because to me it was faster to write and the crucial ones that needed to last longer and might be edited by more people I used ZPT. Don't forget, for writing SQL statements and CSS sheets, DTML rocks! This proves why DTML won't go away as a supported templating "language". On 9/8/05, Jonathan Cyr [EMAIL PROTECTED] wrote: Thanks... but go easy. I have to choose which features of Zope to learn and use, based on a much larger criteria than I can present here. I do not wish to mix ZPT and DTML in my project... I had chosen DTML, before ZPT was mature... It may be better, but I don't care for now... when I'm able to re-assess which pieces of Zope to use in a future project, I may well choose it. As a professional programmer, you must see the advantage in adhering to a project's standards and specs, as to managing the code in the project. That is why I needed to use DTML for my RSS. I have chosen my mix for this project, and benefit much more from my standards docs much more than any single feature like ZPT can provide. As far as I know, DTML is being supported into the future, and my hand will not be forced. I appreciate all the hard work in developing ZPT for the community, but it's just not for me, yet... probably be used in my first Zope 3 project instead. BTW, the solution presented by Peter hit the nail on the head... I have a very nice RSS setup now for my Zope app. Thanks, -Jon Cyr Chris Withers wrote: Jonathan Cyr wrote: I am constructing an RSS 2.0 feed for a zope app. I am creating the rss.xml file in a DTML method. Use ZPT, it's much better suited to this... to include in the feed is a structured-text paragraph. To use any XHTML in a feed you must "html_quote" all of the extended characters for it to work. What do you mean by "extended characters" here? So I wish to do something like dtml-var summary fmt="structured-text" html_quote This obviously doesn't work, (would have been cool if it did tho). How do I access the structured text and html quote translation mechanisms in an expr tag. Something like dtml-var expr="summary.structured_text().html_quote()" ZPT does html quoting by default, so provided summary.structured_text() does what yo uexpect it to, you could just do: tal:x replace="summary/structured_text"/ That said, I'd pretty sure RSS feeds CAN include html, and it doesn't need to be quoted... ps- I don't use ZPT, DTML was chose a while back, and would rather keep Well, un-choose it, especially for something new and isolated like an RSS feed... the RSS in a DTML Method rather than a python script. The layers are getting pretty hairy, don't want to add indention to it Huh?! Chris -- Jonathan Cyr [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Jonathan Cyr [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Same product in multiple instances automatically?
On Friday 09 September 2005 13:56, J Cameron Cooper wrote: I don't know why, either. That simply says that there is a default Products directory ($SOFTWARE_HOME/lib/python/Products), you can't get rid of it, and you shouldn't try to configure it here. The problem I'm having, though, is that those products don't seem to be present in instances by default, which is the opposite of what I'd expect. For example, I'd think that ZPsycopgDA would be available inside each instance since it's present in $ZOPE/Products. If you want your instances to use Products from some other directory, name it here. Yep. I'm wondering if I should create a $ZOPE/CommonProducts directory and add products $ZOPE/CommonProducts to every instance's zope.conf. -- Kirk Strauser The Day Companies ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Same product in multiple instances automatically?
Kirk Strauser wrote: On Friday 09 September 2005 13:56, J Cameron Cooper wrote: I don't know why, either. That simply says that there is a default Products directory ($SOFTWARE_HOME/lib/python/Products), you can't get rid of it, and you shouldn't try to configure it here. The problem I'm having, though, is that those products don't seem to be present in instances by default, which is the opposite of what I'd expect. For example, I'd think that ZPsycopgDA would be available inside each instance since it's present in $ZOPE/Products. Anything in $SOFTWARE_HOME/lib/python/Products is available in any instances that use that SOFTWARE_HOME. You can see this quite easily by looking at the /Control_Panel/Products of an instance with nothing in its $INSTANCE_HOME/Products. I'm not sure what you mean by $ZOPE/Products. If you want your instances to use Products from some other directory, name it here. Yep. I'm wondering if I should create a $ZOPE/CommonProducts directory and add products $ZOPE/CommonProducts to every instance's zope.conf. You can. I typically do the symlink thing, as I can just copy them from an existing instance with a similar or identical setup. --jcc -- Building Websites with Plone http://plonebook.packtpub.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Same product in multiple instances automatically?
On Friday 09 September 2005 13:56, J Cameron Cooper wrote: I don't know why, either. That simply says that there is a default Products directory ($SOFTWARE_HOME/lib/python/Products), you can't get rid of it, and you shouldn't try to configure it here. The problem I'm having, though, is that those products don't seem to be present in instances by default, which is the opposite of what I'd expect. For example, I'd think that ZPsycopgDA would be available inside each instance since it's present in $ZOPE/Products. I'm not sure what you mean by $ZOPE, since that's not an environment variable that means anything to Zope. Yep. I'm wondering if I should create a $ZOPE/CommonProducts directory and add products $ZOPE/CommonProducts to every instance's zope.conf. That's the idea, yeah. -PW ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope 2.8.1 won't make
On 9 Sep 2005, at 19:59, Sophia Grimm wrote: Just downloaded Zope 2.8.1 and I'm trying to install it on MOSX 10.4, which has XCode 2.1 installed. I'm following installation instructions on this page: http://www.plope.com/Books/2_7Edition/InstallingZope.stx#2-6 ./configure runs, but when I try to make, I get this error: makefile:54: *** target pattern contains no `%'. Stop. This happens regardless of the python or prefix I use as arguments when I configure. I've used Python 2.3.5 which comes with MOXS 10.4, and I've used Python 2.3.5 as installed by Fink. I have just downloaded and compiled Zope 2.8.1 successfully using Python 2.3.5 that I have compiled myself on OS X 10.4. This is either a problem with the Python you are using or your setup in general... jens ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Same product in multiple instances automatically?
On Friday 09 September 2005 15:37, J Cameron Cooper wrote: Anything in $SOFTWARE_HOME/lib/python/Products is available in any instances that use that SOFTWARE_HOME. You can see this quite easily by looking at the /Control_Panel/Products of an instance with nothing in its $INSTANCE_HOME/Products. I'm not sure what you mean by $ZOPE/Products. OH! I see what you mean. $ZOPE is defined in $INSTANCE/etc/zope.conf. In my case, it's set to /usr/local/www/Zope, and there's a Products directory inside it. FreeBSD installs new products to that directory. I hadn't noticed that there was also a /usr/local/www/Zope/lib/python/Products directory with different contents. Problem solved, although I'm not sure why /usr/local/www/Zope/Products exists in the first place; maybe it was meant to be a symlink to ./lib/python/Products? Anyway, I think I can figure it out from here. Thanks! -- Kirk Strauser The Day Companies ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Same product in multiple instances automatically?
Kirk Strauser wrote: On Friday 09 September 2005 15:37, J Cameron Cooper wrote: Anything in $SOFTWARE_HOME/lib/python/Products is available in any instances that use that SOFTWARE_HOME. You can see this quite easily by looking at the /Control_Panel/Products of an instance with nothing in its $INSTANCE_HOME/Products. I'm not sure what you mean by $ZOPE/Products. OH! I see what you mean. $ZOPE is defined in $INSTANCE/etc/zope.conf. In my case, it's set to /usr/local/www/Zope, and there's a Products directory inside it. FreeBSD installs new products to that directory. I hadn't noticed that there was also a /usr/local/www/Zope/lib/python/Products directory with different contents. Problem solved, although I'm not sure why /usr/local/www/Zope/Products exists in the first place; maybe it was meant to be a symlink to ./lib/python/Products? Anyway, I think I can figure it out from here. Thanks! In the beginning, there was only one Products directory; this was in lib/python/ along with the rest of the software defining Zope. If you wanted to have, say, two or more running distinct instances of Zope you would have to copy the whole thing. Plus, with third-party products co-mingling with default products, upgrading became difficult. Thus was created the instance/software distinction. Everything needed to run Zope goes into the SOFTWARE_HOME; everything that defines a specific distinct instance goes into INSTANCE_HOME (3rd party Products, Data.fs, config files, logs, etc). You can thus manage (move, upgrade, etc) instances and software separately, and don't have to copy the whole thing to run many instances. (On my dev box, I may have 4-5 running at one time, and maybe 20 total!) This should explain why there are two such directories, and how they should be used. Short version: do not touch the SOFTWARE_HOME after it has been installed. In fact, it might be a good idea to remove all write permissions from that directory. You can co-mingle, of course, but be aware of what advantages you are losing. --jcc -- Building Websites with Plone http://plonebook.packtpub.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Same product in multiple instances automatically?
On Friday 09 September 2005 15:59, J Cameron Cooper wrote: Thus was created the instance/software distinction. Everything needed to run Zope goes into the SOFTWARE_HOME; everything that defines a specific distinct instance goes into INSTANCE_HOME (3rd party Products, Data.fs, config files, logs, etc). ...and on FreeBSD, everything you install through the ports system gets put in a second directory inside SOFTWARE_HOME, distinct from the ones in INSTANCE_HOME, and is not included in running instances by default (regardless of what the 00readme-freebsd.txt in that directory says). In other words, it seems to be a FreeBSD bug rather than a Zope bug, and I'm off to file a problem report so that it'll hopefully get fixed. Thanks for the information that led to uncovering this little surprise. -- Kirk Strauser The Day Companies ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Testing arguments in zsql methods
Hi again, for the records, replying my own recent post: the way to test if a variable exists in a zsql method is through has_key NOT hasattr. In other words: dtml-if _.has_key('foo').../dtml-if Sorry for bothering, it's been a long time not dealing with dtml Pablo Pablo Ziliani wrote: Hi everyone, I have what I think is a banal question here... Is there any way I can test inside a zsql method if an argument has been passed? dtml-if foo won't work because 0 (zero) is an expected value. Have tried dtml-if _.hasattr(_, 'foo') but it seems to be always false (where's that namespace?) TIA, Pablo ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Using Structured Text and HTML-quote together for RSS 2.0
Does this affect Chris's chances in the annual "Zope Cogeniality Awards"? BTW DTML does not suck. I too have written lots of code w/it. I do find ZPT to be preferable - but it does take effort (brain re-wiring) and if your up to your elbows in alligators its just not the time to convert. I waited for the next project to go all ZPT (except with some CSS handling). I'm waiting for my next project to go all Zope 3 and I can't wait. :-) All best, David Jonathan Cyr wrote: Dude, I appreciate the amount of effort that you contribute to the community... but that said... you really are quite rude and obnoxious hence the "Go easy" warning. Your skills in dealing with people pale in comparison to your Zope prowess. Talking down to people doesn't build community... no matter how right you are. Building a community isn't about code, or rightousness... it's about people... consider the effects of your tone on this list. If you need to be right that badly, have at it You're right, DTML sucks, ZPT and whatever else is the obvious solution... my issue is solved... thank you so much for your time. Bait taken, with apologies to all, -Jon Chris Withers wrote: Jonathan Cyr wrote: I have to choose which features of Zope to learn and use, based on a much larger criteria than I can present here. I do not wish to mix ZPT and DTML in my project... I had chosen DTML, before ZPT was mature... It may be better, but I don't care for now... when I'm able to re-assess which pieces of Zope to use in a future project, I may well choose it. Okay, whatever... As a professional programmer, you must see the advantage in adhering to a project's standards and specs, as to managing the code in the project. That is why I needed to use DTML for my RSS. Uh, no, as a professional programmer, I use the best tools for the job, and don't stand by mistakes I made before, like choosing DTML, especially when the two can co-exist quite happilly... I have chosen my mix for this project, and benefit much more from my standards docs much more than any single feature like ZPT can provide. Okay, whatever... As far as I know, DTML is being supported into the future, and my hand will not be forced. Then your hand will be burned, enjoy ;-) Chris -- Jonathan Cyr [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )