[Zope] Re: utf-8 problem in Zope when using Localizer
Install a separate python that is used only by your zope instance. Use setdefaultencoding only there. This is nonense. A custom sitecustomize.py script does the job without installing a complete new Python. You need to read a previous reply: I set it global in sitecustomize.py under /usr/lib/python2.4/site-packages and then dtml-var MessageCatalog('Hallo Welt!') works. Now I only must find the right place for setdefaultencoding() so it only affect my zope-instance. For the path used there /usr/lib/python2.4/site-packages, it seems that the python used by zope is a binary that comes into a rpm package, so, this may break some things on the OS. So, I guess a new python for only zope makes sense here ___ 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] SOAPMethod
Hi Tom to be honest i would much rather use DTML as i understand this but it doesn't seem to work it only returns the result of the SOAP query when i view the source code. The SOAPMethod product recommends DTML but I have followed the example they give and this is what is happening. Mark On Monday 03 September 2007 17:32, Jonathan wrote: - Original Message - From: Tom Von Lahndorff [EMAIL PROTECTED] To: robert rottermann [EMAIL PROTECTED] Cc: zope@zope.org Sent: Monday, September 03, 2007 12:10 PM Subject: Re: [Zope] SOAPMethod Hi Mark, There's nothing wrong with using DTML instead of TAL. each have their drawbacks and benefits and it really comes down to user choice and job requirements. People on this list though will always recommend TAL because they are mostly developers who use WYSIWYG html editors. If you hand code your design markup dtml can be much cleaner, require less code and avoid annoying problems with javascript. Tom +1 ;-) Jonathan On Sep 3, 2007, at 10:10 AM, robert rottermann wrote: Mark Baldry schrieb: I need to get some information from a database and display it on our website. It's a very simple query just passing one number to get the record. The only way i am allowed to query this database is via SOAP. I have installed the SOAPMethod and have got it working but i cannot get the result to display. I can only view the result when i look at the source of the page. the dtml Method i am using is written - dtml-var expr=requestStudentData('5506239') this is what the help that came with the product says to use. (requestStudentData is the name of the SOAPMethod and 5506239 is the query string i am passing to the database.) you better do not use dtml but tal (aka page templates). to learn about it go to the zope site and look up the zope book (take the one on plope.org) it would look something like: html head title tal:content=template/titleThe title/title /head body bSome information on student 5506239/b div tal:content=python:requestStudentData('5506239') / /body /html HTH robert robert.vcf ___ 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 ) -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.485 / Virus Database: 269.13.3/986 - Release Date: 9/3/2007 9:31 AM ___ 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 ) -- Mark Baldry IT support Union of UEA Students t: 01603 592503 e: [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] SOAPMethod
- Original Message - From: Mark Baldry [EMAIL PROTECTED] To: zope@zope.org Sent: Tuesday, September 04, 2007 4:48 AM Subject: Re: [Zope] SOAPMethod Hi Tom to be honest i would much rather use DTML as i understand this but it doesn't seem to work it only returns the result of the SOAP query when i view the source code. The SOAPMethod product recommends DTML but I have followed the example they give and this is what is happening. I have installed the SOAPMethod and have got it working but i cannot get the result to display. I can only view the result when i look at the source of the page. the dtml Method i am using is written - dtml-var expr=requestStudentData('5506239') this is what the help that came with the product says to use. (requestStudentData is the name of the SOAPMethod and 5506239 is the query string i am passing to the database.) If I understand correctly, you are saying that the requestStudentData method is returning the correct information, but that information is not displaying in your web browser, and that you can only see the information returned by requestStudentData if you view the source for the page. If this is the case, then it sounds like an html/css display problem, not a dtml problem. To verify this, create a dtml method that contains: html headtitleTesting/title/head body dtml-var requestStudentData('5506239') /body /html If the information displays correctly when you click on the View tab for the above dtml method then you know that you have an html/css problem in your original dtml method. If you don't see the correct information, then your 'requestStudentData' method is not functioning correctly. hth Jonathan ___ 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] SOAPMethod
- Original Message - From: Mark Baldry [EMAIL PROTECTED] To: Jonathan [EMAIL PROTECTED] Sent: Tuesday, September 04, 2007 8:00 AM Subject: Re: [Zope] SOAPMethod hi that was the first thing i tried and it makes no difference i still get a blank page with the response only viewable when i look at the source. Mark On Tuesday 04 September 2007 12:51, you wrote: html headtitleTesting/title/head body dtml-var requestStudentData('5506239') /body /html Can you post the source of the 'blank' page? Jonathan ___ 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] SOAPMethod
See Johnathan's comment. It sounds like an html/css issue. If it renders in the source its working. On Sep 4, 2007, at 4:48 AM, Mark Baldry wrote: Hi Tom to be honest i would much rather use DTML as i understand this but it doesn't seem to work it only returns the result of the SOAP query when i view the source code. The SOAPMethod product recommends DTML but I have followed the example they give and this is what is happening. Mark On Monday 03 September 2007 17:32, Jonathan wrote: - Original Message - From: Tom Von Lahndorff [EMAIL PROTECTED] To: robert rottermann [EMAIL PROTECTED] Cc: zope@zope.org Sent: Monday, September 03, 2007 12:10 PM Subject: Re: [Zope] SOAPMethod Hi Mark, There's nothing wrong with using DTML instead of TAL. each have their drawbacks and benefits and it really comes down to user choice and job requirements. People on this list though will always recommend TAL because they are mostly developers who use WYSIWYG html editors. If you hand code your design markup dtml can be much cleaner, require less code and avoid annoying problems with javascript. Tom +1 ;-) Jonathan On Sep 3, 2007, at 10:10 AM, robert rottermann wrote: Mark Baldry schrieb: I need to get some information from a database and display it on our website. It's a very simple query just passing one number to get the record. The only way i am allowed to query this database is via SOAP. I have installed the SOAPMethod and have got it working but i cannot get the result to display. I can only view the result when i look at the source of the page. the dtml Method i am using is written - dtml-var expr=requestStudentData('5506239') this is what the help that came with the product says to use. (requestStudentData is the name of the SOAPMethod and 5506239 is the query string i am passing to the database.) you better do not use dtml but tal (aka page templates). to learn about it go to the zope site and look up the zope book (take the one on plope.org) it would look something like: html head title tal:content=template/titleThe title/title /head body bSome information on student 5506239/b div tal:content=python:requestStudentData('5506239') / /body /html HTH robert robert.vcf ___ 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 ) -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.485 / Virus Database: 269.13.3/986 - Release Date: 9/3/2007 9:31 AM ___ 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 ) -- Mark Baldry IT support Union of UEA Students t: 01603 592503 e: [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 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] SOAPMethod
- Original Message - From: Mark Baldry [EMAIL PROTECTED] To: Jonathan [EMAIL PROTECTED] Sent: Tuesday, September 04, 2007 8:22 AM Subject: Re: [Zope] SOAPMethod hi source of page -- html headtitleTesting/title/head body ?xml version=1.0 encoding=ISO-8859-1? uconnect_message count=1person ccard_number=5506239 first_forename=Mark surname=Baldry school=UUEAS friendly_email=[EMAIL PROTECTED] / /uconnect_message /body /html Your requestStudentData method is returning XML encoded data, so you need to write a dtml method (or script) that will display the xml fields. This may give you some ideas: http://www.xml.com/pub/a/1999/12/zope/index.html Jonathan ___ 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] UTF encoding problem w/ ZPT's (No, not the usual :)
Well it tries to call only because the varial ISN'T a str :) If it's a string it behaves one way, else, it behaves another, and tries to call what it got. I imagine there's circumstances where this is used. I'll put something in the collector then, and we'll see where it goes. J.F. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Withers Sent: September 3, 2007 02:55 To: Doyon, Jean-Francois Cc: zope@zope.org Subject: Re: [Zope] UTF encoding problem w/ ZPT's (No, not the usual :) Doyon, Jean-Francois wrote: 'user': SpecialUser 'Anonymous User'} TypeError: 'unicode' object is not callable The problem is that zope.tales.tales.evaluate() tests for a str ... But, now, for unknown reasons, it's getting a unicode string. ...but even if it got an str, str's aren't callable either. Might be something to look at... 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 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] Stripping Quotes
doesn't work. the double quotes are not escaped and zope sees them as the end of the expression. From: Jaroslav Lukesh [EMAIL PROTECTED] Date: August 29, 2007 6:16:12 PM EDT To: Zope user list zope@zope.org, Tom Von Lahndorff [EMAIL PROTECTED] Subject: Re: [Zope] Stripping Quotes dtml-var _.str('string\with\'quotes').replace('\','').replace ('\'','') - Original Message - From: Tom Von Lahndorff [EMAIL PROTECTED] Whats the best way to strip (double and/or single) quotes from a string in python and/or dtml? Thanks.___ 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: utf-8 problem in Zope when using Localizer
Josef Meile wrote at 2007-9-4 09:31 +0200: Install a separate python that is used only by your zope instance. Use setdefaultencoding only there. This is nonense. A custom sitecustomize.py script does the job without installing a complete new Python. You need to read a previous reply: I set it global in sitecustomize.py under /usr/lib/python2.4/site-packages and then dtml-var MessageCatalog('Hallo Welt!') works. Now I only must find the right place for setdefaultencoding() so it only affect my zope-instance. For the path used there /usr/lib/python2.4/site-packages, it seems that the python used by zope is a binary that comes into a rpm package, so, this may break some things on the OS. So, I guess a new python for only zope makes sense here There is no need to put sitecustomize.py in the global Python distribution. Any place on the PYTHONPATH as effective when Python starts is sufficient. We ensure that $INSTANCE_HOME/lib/python is on this path and then can put sitecustomize.py there. -- 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 )