From GriffMeiggs at bigpond.com Wed Sep 1 00:59:48 2004 From: GriffMeiggs at bigpond.com (Elden Brueckner) Date: Wed Sep 1 00:00:06 2004 Subject: [ZPT] did I send this to you? Message-ID: <20040901040003.EB1E02030A1@mail.zope.org> An HTML attachment was scrubbed... URL: http://mail.zope.org/pipermail/zpt/attachments/20040901/9385b767/attachment.htm From something at gmail.com Wed Sep 1 07:46:50 2004 From: something at gmail.com (Sean) Date: Wed Sep 1 07:46:54 2004 Subject: [ZPT] Can't get getSize to work Message-ID: <327e65eb040901044679e50cf4@mail.gmail.com> I can't get examples from http://zope.org/Documentation/Books/ZopeBook/2_6Edition/ZPT.stx to work. Specifically I've been trying this code:
Number Id Meta?Type Title
# Id Meta?Type Title
I get this error: Error Type KeyError Error Value 'getSize' Also the Python script example (filesize macro) don't work 'cause they use the same function getSize. The same template works fine in a Folder where there are only files (no subfolders) so I think maybe Folder objects have no size so getSize fails and causes error? I've been trying to modify the code to list only non-Folders (files, actually) but I don't know how to do it - this is what I tried (doesn't work of course) Can someone help me with this? Thanks Sean From something at gmail.com Wed Sep 1 14:07:22 2004 From: something at gmail.com (Sean) Date: Wed Sep 1 14:07:30 2004 Subject: Fwd: [ZPT] Can't get getSize to work In-Reply-To: <4135F781.2000405@rangebroadband.com> References: <327e65eb040901044679e50cf4@mail.gmail.com> <4135F781.2000405@rangebroadband.com> Message-ID: <327e65eb04090111071c76e74d@mail.gmail.com> >> (doesn't work of course) >> > >Put in all the objects you _want_: >i.e. objectValues(['file', 'DTML Document', 'Page Template']) >Exclude 'Folder' if you don't want it. >the objectValues() function takes a sequence of objects for an argument. Thanks Jeffrey for help - it seems that all objects without referenced properties (I don't know if I'm using correct terms here) cause error, so the way to fix this problem is to exclude all non-File objects (such as Folders, macros, etc.). objectValues(['file', 'DTML Document', 'Page Template']) would list the things I want, but it error would happen later in the code when the template attempts to get some properties that non-Files don't have. Is there a way to exclude everything that's not 'file' (so that I don't have to check for all possibilities in every folder)? Thanks Sean From dieter at handshake.de Wed Sep 1 15:40:11 2004 From: dieter at handshake.de (Dieter Maurer) Date: Wed Sep 1 16:12:51 2004 Subject: [ZPT] Can't get getSize to work In-Reply-To: <327e65eb040901044679e50cf4@mail.gmail.com> References: <327e65eb040901044679e50cf4@mail.gmail.com> Message-ID: <16694.9627.542987.136990@gargle.gargle.HOWL> Sean wrote at 2004-9-1 19:46 +0800: > ... >Id >Error Type > KeyError >Error Value > 'getSize' Not all objects have a "getSize" method. Try: Id (????) -- Dieter From chris at simplistix.co.uk Thu Sep 2 17:22:07 2004 From: chris at simplistix.co.uk (Chris Withers) Date: Thu Sep 2 17:22:17 2004 Subject: [ZPT] why does tal not get interpretted inside , but not > the lines between . That is why the comment tags are often used > within script tags. Why not do it like that for TAL. That would allow users > to use TAL within script tags. And if the script has strings containing > tags, then use the comment tags to skip that part. The example would then > be: > > This is a very good idea from my p.o.v. What do other people think? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk From fdrake at gmail.com Tue Sep 7 12:13:11 2004 From: fdrake at gmail.com (Fred Drake) Date: Tue Sep 7 12:13:21 2004 Subject: [ZPT] Re: [Roundup-users] why does tal not get interpretted inside tags? In-Reply-To: <413D809B.5070602@simplistix.co.uk> References: <0F7C196E2F6AD511A62700B0D0D06F6F02AA4C66@FIMOEXH01> <413D809B.5070602@simplistix.co.uk> Message-ID: <9cee7ab8040907091359a08e45@mail.gmail.com> On Tue, 07 Sep 2004 10:34:19 +0100, Chris Withers wrote: > Marlon van den Berg wrote: > > *old* browsers do parse the lines in-between , but not > > the lines between . That is why the comment tags are often used > > within script tags. Why not do it like that for TAL. That would allow users > > to use TAL within script tags. And if the script has strings containing > > tags, then use the comment tags to skip that part. The example would then > > be: > > > > > > This is a very good idea from my p.o.v. > What do other people think? There lies the path to insanity. Lots of special rules cause lots of special code, which ends up difficult to maintain. This is a bad thing. -Fred -- Fred L. Drake, Jr. Zope Corporation From dieter at handshake.de Tue Sep 7 13:38:25 2004 From: dieter at handshake.de (Dieter Maurer) Date: Tue Sep 7 14:11:33 2004 Subject: [ZPT] Re: [Roundup-users] why does tal not get interpretted inside tags? In-Reply-To: <413D809B.5070602@simplistix.co.uk> References: <0F7C196E2F6AD511A62700B0D0D06F6F02AA4C66@FIMOEXH01> <413D809B.5070602@simplistix.co.uk> Message-ID: <16701.61969.212644.495213@gargle.gargle.HOWL> Chris Withers wrote at 2004-9-7 10:34 +0100: >Marlon van den Berg wrote: >> *old* browsers do parse the lines in-between , but not >> the lines between . That is why the comment tags are often used >> within script tags. Why not do it like that for TAL. That would allow users >> to use TAL within script tags. TAL tries to adhere to the SGML/XML specification and "" is an SGML/XML comment. Thus, TAL ignores anything between "" *provided* that the "" occurs in markup sections -- this excludes CDATA content elements such as "script" (in HTML). -- Dieter From marlon.vandenberg at tiscali.nl Tue Sep 7 14:39:19 2004 From: marlon.vandenberg at tiscali.nl (Marlon van den Berg) Date: Tue Sep 7 14:39:25 2004 Subject: [ZPT] Re: [Roundup-users] why does tal not get interpretted inside tags? References: <0F7C196E2F6AD511A62700B0D0D06F6F02AA4C66@FIMOEXH01> <413D809B.5070602@simplistix.co.uk> <9cee7ab8040907091359a08e45@mail.gmail.com> Message-ID: <001401c49509$fcb6f6f0$929ea952@vandeberg> On Tuesday, September 07, 2004 6:13 PM, Fred Drake wrote: > On Tue, 07 Sep 2004 10:34:19 +0100, Chris Withers > > This is a very good idea from my p.o.v. > > What do other people think? > > There lies the path to insanity. Lots of special rules cause lots of > special code, which ends up difficult to maintain. This is a bad > thing. Why special rules? In fact, the rules will become simpler. Just allow TAL within all HTML tags with exception of the comment tags . Isn't that the same aproach as TAL uses with XML?. And why not? TAL allows to be used inside the tag itself. Isn't this one valid too!: Sure, it would look insane if something like the next is used: but so it the next too. And that one is allowed by TAL. <span tal:content="I rest my case!" /> Regards, Marlon From gotcha at bubblenet.be Wed Sep 8 06:57:36 2004 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Wed Sep 8 06:56:01 2004 Subject: [ZPT] Re: why does tal not get interpretted inside where the tal:script is to show that a defined variable used in the script and where the newlines in the tal:content otf the script tag allow for nice output (shown hereunder) > > Chris > -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From gotcha at bubblenet.be Wed Sep 8 06:57:36 2004 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Wed Sep 8 06:56:19 2004 Subject: [ZPT] Re: why does tal not get interpretted inside where the tal:script is to show that a defined variable used in the script and where the newlines in the tal:content otf the script tag allow for nice output (shown hereunder) > > Chris > -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From ozoneprotection at yahoo.com Thu Sep 9 12:04:45 2004 From: ozoneprotection at yahoo.com (L. Intl Singapore) Date: Thu Sep 9 12:04:54 2004 Subject: [ZPT] Business Opportunity Message-ID: <20040909160451.ADCE620315E@mail.zope.org> We are a Singapore based company with a global business operation. We are currently targeting at a new consumer industry in the Philippines and worldwide. We are bringing a new aromatic air product and its global marketing concept to you and your business community. We would like to share this new business experience with like-minded businessmen, professionals and entrepreneurs who are ready to make the difference in life. Just like the clean water industry, we would like to share this vision of a clean air market worth billions of dollars with you. My name is Victor Sim, I will be traveling to Cebu around the 13th September of this month to meet clients and conduct a product awareness seminar. If you are interested, kindly provide us your name, contact number (cell-phone number & landline), your profession and the location that you are based so that I can meet up with you. Victor Sim trinity@starhub.net.sg or ozoneprotection@yahoo.com Disclaimer: This email, together with any attachments, is intended ONLY for the use of the individual or entity to which it is addressed, and may contain information that is legally priviledged, confidential, and/or subject to copyright. If you are not the intended recipient, please be informed that any dissemination, distribution or copying of this email, any attachment, or part thereof is strictly prohibited. Kindly note that internet communication are not secure, and therefore are susceptible to alterations. If you have received this email in error, please advise the sender by reply email, and delete this message. Your co-operation on this matter is highly appreciated. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.zope.org/pipermail/zpt/attachments/20040910/8ca09cde/attachment.htm From kang_derek at yahoo.com Sat Sep 11 19:29:24 2004 From: kang_derek at yahoo.com (Derek Kang) Date: Sat Sep 11 19:29:36 2004 Subject: [ZPT] Global Business Model Platform...in the Philippnes Message-ID: <20040911232935.179822030BC@mail.zope.org> Dear Business Owner/Professional, Our company is currently opening up a new industry in the Philippines, India, China and Globally. Are you open to new business opportunity? What we need is just 15mins of your time to show you how to capitalise IF you have friends & relatives in USA, CANADA, JAPAN, CHINA, SINGAPORE & INDIA. Interested, please call @ +639164895664 (Phils) or provide us the following for an appointment. Particulars: Name: Contact No.: Location: Email: Occupation: Sincerely, Derek Kang Business Development, Asia Disclaimer: This email, together with any attachments, is intended ONLY for the use of the individual or entity to which it is addressed, and may contain information that is legally privileged, confidential, and/or subject to copyright. If you are not the intended recipient, please be informed that any dissemination, distribution or copying of this email, any attachment, or part thereof is strictly prohibited. Kindly note that internet communications are not secure, and therefore are susceptible to alterations. If you have received this email in error, please advise the sender by reply email, and delete this message. Your co-operation on this matter is highly appreciated. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.zope.org/pipermail/zpt/attachments/20040912/8c1d26a1/attachment.htm From lawgon at thenilgiris.com Mon Sep 13 00:04:24 2004 From: lawgon at thenilgiris.com (Kenneth Gonsalves) Date: Mon Sep 13 01:47:31 2004 Subject: [ZPT] displaying images from a postgres table Message-ID: <04091309342410.01154@thenilgiris.com> hi, i have a postgres table where one of the fields is a bytea (jpeg image). I cannot get this image to display on a zpt template. Some problem with the header? any clues? -- regards kg http://www.onlineindianhotels.net - fastest hotel search website in the world http://www.ootygolfclub.org From tino at wildenhain.de Mon Sep 13 02:02:25 2004 From: tino at wildenhain.de (Tino Wildenhain) Date: Mon Sep 13 02:02:43 2004 Subject: [ZPT] displaying images from a postgres table In-Reply-To: <04091309342410.01154@thenilgiris.com> References: <04091309342410.01154@thenilgiris.com> Message-ID: <1095055345.1520.319.camel@Andrea.peacock.de> Hi Kenneth, Am Mo, den 13.09.2004 schrieb Kenneth Gonsalves um 6:04: > hi, > i have a postgres table where one of the fields is a bytea (jpeg image). I > cannot get this image to display on a zpt template. Some problem with the > header? any clues? This is not related to ZPT or whatever. You dont include the data inline - you refer to the image by URL. So you need something to actually produce the image (and only the image, not any HTML) For example a python script like this: imagename="/".join(traverse_subpath) request=context.REQUEST response=request.RESPONSE res=ZSQLMethodTOQueryDB(imagepath=imagename) if res: data=res["byteadataforimage"] # now lets assume all images are gif response.setHeader("Content-Type","image/gif") return data If you have gif, jpeg all mixed either you have the hint about this in the DB too or guess it from the name (if you save with extensions) or you read the first few bytes of data and decide. The script above cann be called via path/to/TheScript/someimage someimage goes to traverse subpath and in the script, imagename="someimage" If you have more path elements, in my example they are concenated via / HTH Tino Wildenhain From lists at andreas-jung.com Mon Sep 13 02:05:12 2004 From: lists at andreas-jung.com (Andreas Jung) Date: Mon Sep 13 02:05:29 2004 Subject: [ZPT] displaying images from a postgres table In-Reply-To: <04091309342410.01154@thenilgiris.com> References: <04091309342410.01154@thenilgiris.com> Message-ID: --On Montag, 13. September 2004 9:34 Uhr +0530 Kenneth Gonsalves wrote: > hi, > i have a postgres table where one of the fields is a bytea (jpeg image). > I cannot get this image to display on a zpt template. Some problem with > the header? any clues? > -- > A detailed description and the corresponding parts of the offending code would be helpful if you expect help. Thanks, -aj From ozoneprotection at yahoo.com Mon Sep 13 10:24:42 2004 From: ozoneprotection at yahoo.com (L. Intl Singapore) Date: Mon Sep 13 10:24:48 2004 Subject: [ZPT] Business Opportunity Message-ID: <20040913142446.E617D20315A@mail.zope.org> We are a Singapore based company with a global business operation. We are currently targeting at a new consumer industry in the Philippines and worldwide. We are bringing a new aromatic air product and its global marketing concept to you and your business community. We would like to share this new business experience with like-minded businessmen, professionals and entrepreneurs who are ready to make the difference in life. Just like the clean water industry, we would like to share this vision of a clean air market worth billions of dollars with you. My name is Victor Sim, I am currently in Cebu to meet clients and conduct our product awareness seminar. If you are interested, kindly provide us your name, contact number (cell-phone number & landline), your profession and the location that you are based so that I can meet up with you. Victor Sim trinity@starhub.net.sg or ozoneprotection@yahoo.com Disclaimer: This email, together with any attachments, is intended ONLY for the use of the individual or entity to which it is addressed, and may contain information that is legally priviledged, confidential, and/or subject to copyright. If you are not the intended recipient, please be informed that any dissemination, distribution or copying of this email, any attachment, or part thereof is strictly prohibited. Kindly note that internet communication are not secure, and therefore are susceptible to alterations. If you have received this email in error, please advise the sender by reply email, and delete this message. Your co-operation on this matter is highly appreciated. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.zope.org/pipermail/zpt/attachments/20040913/366411af/attachment.htm From lemonsakes at tidni.com Tue Sep 14 15:17:03 2004 From: lemonsakes at tidni.com (Feklar) Date: Tue Sep 14 14:17:33 2004 Subject: [ZPT] 2 + 7 = 11. Let's check it... adults Message-ID: An HTML attachment was scrubbed... URL: http://mail.zope.org/pipermail/zpt/attachments/20040914/4b2ff1bf/attachment.htm From chris at simplistix.co.uk Tue Sep 14 17:33:25 2004 From: chris at simplistix.co.uk (Chris Withers) Date: Tue Sep 14 17:34:05 2004 Subject: [ZPT] Re: why does tal not get interpretted inside >> >>This is a very good idea from my p.o.v. >>What do other people think? > > There lies the path to insanity. Lots of special rules cause lots of > special code, which ends up difficult to maintain. This is a bad > thing. Well, the difference in processing in the