Re: [Zope] dtml-in pagination
Bobby wrote at 2009-4-7 09:58 -0700: > > previous > next > > > > > Not sure, whether you will find it useful. But, you may have a look at "http://www.handshake.de/~dieter/pyprojects/zope/book/chap3.html#c37ac15c14b4";. Search there for "4.3.5.2.3. Batch control". -- 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] dtml-in pagination
">Previous ">Next From: http://www.zope.org/Members/peterbe/DTML2ZPT/ Incidently, this is a great resource for moving from DTML to page templates. There are many examples of batching on ZopeLabs as well, from what I could see they are for ZPT though. http://www.zopelabs.com -- Jeffrey D Peterson Webmaster Crary Industries, Inc. -Original Message- From: zope-boun...@zope.org [mailto:zope-boun...@zope.org] On Behalf Of Bobby Sent: Tuesday, April 07, 2009 2:48 PM To: zope@zope.org Subject: Re: [Zope] dtml-in pagination Could someone point me to some documentation on how to do pagination? Thanks. --- On Tue, 4/7/09, Bobby wrote: > From: Bobby > Subject: [Zope] dtml-in pagination > To: zope@zope.org > Date: Tuesday, April 7, 2009, 10:58 AM > Hi, > > I'm trying to do pagination with dtml-in; could one of > you show my why i can't get the next and previous button > from my code below to work? > > Also, i need to do view per page: 1,2,3,etc. and allow the > user select the number of records displayed per page (size) > as well. Thanks in advance for any advice. > > "getTable(table=table,order_by=order_by,sort=sort)" > size=10 start=0> > > > > previous > next > > > > > > > > > ___ > 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] dtml-in pagination
Could someone point me to some documentation on how to do pagination? Thanks. --- On Tue, 4/7/09, Bobby wrote: > From: Bobby > Subject: [Zope] dtml-in pagination > To: zope@zope.org > Date: Tuesday, April 7, 2009, 10:58 AM > Hi, > > I'm trying to do pagination with dtml-in; could one of > you show my why i can't get the next and previous button > from my code below to work? > > Also, i need to do view per page: 1,2,3,etc. and allow the > user select the number of records displayed per page (size) > as well. Thanks in advance for any advice. > > "getTable(table=table,order_by=order_by,sort=sort)" > size=10 start=0> > > > > previous > next > > > > > > > > > ___ > 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] dtml-in
that works, thanks. --- On Wed, 4/1/09, Andreas Jung wrote: From: Andreas Jung Subject: Re: [Zope] dtml-in To: cybercruis...@yahoo.com Cc: zope@zope.org Date: Wednesday, April 1, 2009, 10:56 PM -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02.04.2009 5:20 Uhr, Bobby wrote: > Hi, > > I have a variable called "checkGroup" where its values are the record ids that the user selected to be deleted. I have a deleteRecord method that takes two arguements, one the sql table and the record id to be deleted. The code below works fine except for when the user only select one item from the checkGroup list, I get an error "string not allow in in". Any suggestions of how I could fix this? Thanks. > > > > > > Trible check that your form parameters use the ':list' directive within the NAME attributes (check with the Zope Book (docs.zope.org). - -akj -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknURWAACgkQCJIWIbr9KYyepgCcCv5yINX6+DenO0SayWY3HnML Jo8AoOlY7ykeWzI/g2jPfklXUVy5wgIS =L0Im -END PGP SIGNATURE- ___ 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] dtml-in
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02.04.2009 5:20 Uhr, Bobby wrote: > Hi, > > I have a variable called "checkGroup" where its values are the record ids > that the user selected to be deleted. I have a deleteRecord method that takes > two arguements, one the sql table and the record id to be deleted. The code > below works fine except for when the user only select one item from the > checkGroup list, I get an error "string not allow in in". Any suggestions of > how I could fix this? Thanks. > > > > > > Trible check that your form parameters use the ':list' directive within the NAME attributes (check with the Zope Book (docs.zope.org). - -akj -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknURWAACgkQCJIWIbr9KYyepgCcCv5yINX6+DenO0SayWY3HnML Jo8AoOlY7ykeWzI/g2jPfklXUVy5wgIS =L0Im -END PGP SIGNATURE- begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. & Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:i...@zopyx.com title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1 end:vcard ___ 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] dtml-in sorting bug (collector #1884)
--On 1. September 2006 07:46:33 -0400 "Allen Schmidt Sr." <[EMAIL PROTECTED]> wrote: r.__cmp__(x,y) requires y to be a 'r', not a 'ImplicitAcquirerWrapper' http://www.zope.org/Collectors/Zope/1884 I see this is a pending case but does anyone have any idea if it will be fixed in future releases? Finally got a 2.8.8 instance running with our Data (from 2.7.5) and was able to run the catalog index fixer with help from Chris Withers (THANKS!!) and all was looking good. The pages that looked up news stories from the catalog are looking good. Then I went to a page that displayed Houses (from ZSQL methods) and does a sort on the results as is the case in MANY pages we have. The top line is the result on the error page. Seems its a well know bug but does not look like its an issue to most but it is to us. Bugs are fixed on a voluntary basis. The chance having it fixed for the next version is higher when you work on a patch and tests. I doubt that this issue has a high priority for most of the core developers. -aj pgp3g0Mpp2CEg.pgp Description: PGP signature ___ 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] DTML-In with date/time filter
Dieter Maurer wrote: Martin Koekenberg wrote at 2006-5-3 14:47 +0200: I use this code in a Python script and call this script within a DTML-IN statement. What I need is a script to get only items with a date in the future, today or in the past. The objects are DTML Documents with a date property field. Assuming, your property contains a date, you can uses something like (to get things with dates in the future): now = container.ZopeTime() # see the "DateTime" documentation for other times return [obj for obj in context.objectValues() if obj.getProperty(...) > now I'm fairly sure he'll want to change that if statement to: if not obj.getProperty(...).latestTime().isPast() 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 )
Re: [Zope] DTML-In with date/time filter
Martin Koekenberg wrote at 2006-5-3 14:47 +0200: >I use this code in a Python script and call this script within a DTML-IN >statement. What I need is a script to get only items with a date in the >future, today or in the past. The objects are DTML Documents with a date >property field. Assuming, your property contains a date, you can uses something like (to get things with dates in the future): now = container.ZopeTime() # see the "DateTime" documentation for other times return [obj for obj in context.objectValues() if obj.getProperty(...) > now ] -- 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] DTML-In with date/time filter
You are going to have to loop thru the documents and use 'getProperty' to access the date property field on the document. Then you will need to compare the date value (the Zope Book V2.6 has a good description of dates/time usage) to see if it is in the range you need. You could use a python script to do this loop/compare and return a list of document ids which you could then display via your DTML-in stmt. If you have a lot of documents this could be a very expensive approach. You might want to have a look at ZCatalog. hth Jonathan - Original Message - From: Martin Koekenberg To: zope@zope.org Sent: Wednesday, May 03, 2006 8:47 AM Subject: Re: [Zope] DTML-In with date/time filter Hello Andreas, I use this code in a Python script and call this script within a DTML-IN statement. What I need is a script to get only items with a date in the future, today or in the past. The objects are DTML Documents with a date property field. Regards Martin Koekenberg -Original Message- From: Andreas Jung <[EMAIL PROTECTED]> To: Martin Koekenberg <[EMAIL PROTECTED]>, zope@zope.org Date: Wed, 03 May 2006 12:20:33 +0200 Subject: Re: [Zope] DTML-In with date/time filter --On 3. Mai 2006 12:17:36 +0200 Martin Koekenberg <[EMAIL PROTECTED]> wrote: Hallo, I can create a dtml-in filte with the following code: return [doc for doc in context.objectValues('DTML Document') if doc.getProperty('a')!='de'] Using "return" in DTML does not make sense. Writing such code in DTML is bad-style. Use Pythonscript for this code and call the script from DTML (btw. better user ZPT). How can I do the same with a date or time ? What does that mean? -aj -- ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope & Plone development, Consulting ___ 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] DTML-In with date/time filter
Hello Andreas, I use this code in a Python script and call this script within a DTML-IN statement. What I need is a script to get only items with a date in the future, today or in the past. The objects are DTML Documents with a date property field. Regards Martin Koekenberg -Original Message-From: Andreas Jung <[EMAIL PROTECTED]>To: Martin Koekenberg <[EMAIL PROTECTED]>, zope@zope.orgDate: Wed, 03 May 2006 12:20:33 +0200Subject: Re: [Zope] DTML-In with date/time filter --On 3. Mai 2006 12:17:36 +0200 Martin Koekenberg <[EMAIL PROTECTED]> wrote:>> Hallo,> I can create a dtml-in filte with the following code:>> return [doc for doc in context.objectValues('DTML Document') if> doc.getProperty('a')!='de']Using "return" in DTML does not make sense. Writing such code in DTMLis bad-style. Use Pythonscript for this code and call the script fromDTML (btw. better user ZPT).>> How can I do the same with a date or time ?What does that mean?-aj-- ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376E-Publishing, Python, Zope & Plone development, Consulting ___ 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] DTML-In with date/time filter
--On 3. Mai 2006 12:17:36 +0200 Martin Koekenberg <[EMAIL PROTECTED]> wrote: Hallo, I can create a dtml-in filte with the following code: return [doc for doc in context.objectValues('DTML Document') if doc.getProperty('a')!='de'] Using "return" in DTML does not make sense. Writing such code in DTML is bad-style. Use Pythonscript for this code and call the script from DTML (btw. better user ZPT). How can I do the same with a date or time ? What does that mean? -aj -- ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope & Plone development, Consulting pgpZMOmKPCgL4.pgp Description: PGP signature ___ 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] DTML-In with filter
+---[ Martin Koekenberg ]-- | Hello, | | Is it possible to use a DTML-In to display all DTML Documents in a folder exept | the one's with a centain value in a property ? | | Example. | | DTML Document one with property a=bc | DTML Document two with property a=de | DTML Document three with property a=bc | | Now I want to use DTML-IN to display all the dtml documents except the ones | with property a=de. | I also use the size and batchsize property to create links to the next 10 | documents. If I use an if statement the next 10 can be 9 ore less 9 items | because there could be one ore more documents with a=de. | | Who can help me ? Pseudo-code (dtml-like) Or you could write a python script that filtered out the ones you wanted and call the python script to return the list of things to display, which is probably a much better idea. -- Andrew Milton [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] DTML-In with filter
Martin Koekenberg schrieb: Hello, Is it possible to use a DTML-In to display all DTML Documents in a folder exept the one's with a centain value in a property ? Example. DTML Document one with property a=bc DTML Document two with property a=de DTML Document three with property a=bc Now I want to use DTML-IN to display all the dtml documents except the ones with property a=de. I also use the size and batchsize property to create links to the next 10 documents. If I use an if statement the next 10 can be 9 ore less 9 items because there could be one ore more documents with a=de. Just drop this DTML... or at least get help from python: return [doc for doc in context.objectValues('DTML Document') if doc.getProperty('a')!='de'] (python script or the like would be your friend - also it makes it possible to replace the quite costy objectValues() call with ZCatalog query w/o changing your presentation code) Regards Tino ___ 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] DTML in Zope 2 vs Zope 3
Remy Pinsonnault wrote: I agree, I find DTML great and s simple and clear. Right. Then you've obviously never tried to figure out exactly where DTML is looking up a particular name ;-) 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] DTML in Zope 2 vs Zope 3
Ismet Dere escribió: On 5/27/05, Hugo Ramos <[EMAIL PROTECTED]> wrote: On 5/27/05, Chris Withers <[EMAIL PROTECTED]> wrote: AT? As in ArcheTypes? You ARE kidding right? I've never seen such bad code, and in particular, abuse of ZPT in my entire life... And DTML sux, you wanna use it, fine, that says something about you. Use ZClasses, Plone, AT and XUF at the same time while you're at it. Why not dig out LoginManager and ZPatterns too, just for good measure? Hell, why not just do us all a favour and switch to using Perl where you'll be s much happier, and everyone in the community will agree with you rather than trying to help you not shoot yourself in the foot ;-) Is it me or are you really pissed??? :-) At least give DTML some credit... It's what made Zope so popular in the first days because of easy and fast learning curve!!! Regards Hugo Yup, I completely agree with Hugo, dtml what made zope, zope. Chris probably has a point as an advanced user but zope still needs a lot of joe-beginners and their needs to be considered too. ismet -- Hugo Ramos - [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 ) Sorry but, in my opinion, acquisition make zope, zope, products make zope zope, python make zope, zope but DTML, in my opinion, remember, is only a product See ya -- Mis Cosas http://blogs.sistes.net/Garito/ ___ 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] DTML in Zope 2 vs Zope 3
Am Montag, den 30.05.2005, 13:05 +0800 schrieb Ismet Dere: > I also like DTML a lot, found it way too easy to understand and simple to use. I wonder how DTML is more easy then an equally simple python expression in a script? Lazy people should love ZPT since it saves a lot of typing compared to DTML - otoh, a general rule seems to be: beginners tend to write overly comlicated code. > it was that simplicity of DTML that made me choose and use Zope over > PHP in the first place. > > if dtml is to be phased out, Zope will be less attractive for new > users then soon will be irrelevant no matter how sophisticated and > advanced it may become. No, it will not phased out. Neither in zope2 nor in zope3. ___ 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] DTML in Zope 2 vs Zope 3
On 5/27/05, Hugo Ramos <[EMAIL PROTECTED]> wrote: > On 5/27/05, Chris Withers <[EMAIL PROTECTED]> wrote: > > AT? As in ArcheTypes? You ARE kidding right? I've never seen such bad > > code, and in particular, abuse of ZPT in my entire life... > > > > And DTML sux, you wanna use it, fine, that says something about you. Use > > ZClasses, Plone, AT and XUF at the same time while you're at it. Why not > > dig out LoginManager and ZPatterns too, just for good measure? > > > > Hell, why not just do us all a favour and switch to using Perl where > > you'll be s much happier, and everyone in the community will agree > > with you rather than trying to help you not shoot yourself in the foot ;-) > > Is it me or are you really pissed??? :-) > At least give DTML some credit... It's what made Zope so popular in > the first days because of easy and fast learning curve!!! > > Regards > Hugo > Yup, I completely agree with Hugo, dtml what made zope, zope. Chris probably has a point as an advanced user but zope still needs a lot of joe-beginners and their needs to be considered too. ismet > -- > Hugo Ramos - [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] DTML in Zope 2 vs Zope 3
--On 30. Mai 2005 13:05:31 +0800 Ismet Dere <[EMAIL PROTECTED]> wrote: if dtml is to be phased out, Zope will be less attractive for new users then soon will be irrelevant no matter how sophisticated and advanced it may become. There are no plans to phase DTML out - neither in Zope 2 nor in Zope 3 as far as I know. If you want or need to use DTML -> just use it. In general people are strongly encouraged to use ZPT for any kind of templates and use DTML only there where necessary e.g. when you want to create non-HTML/XML documents inside Zope..but in general ZPT is the preferred way to go. -aj pgpwA3TO88B4S.pgp Description: PGP signature ___ 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] DTML in Zope 2 vs Zope 3
I also like DTML a lot, found it way too easy to understand and simple to use. it was that simplicity of DTML that made me choose and use Zope over PHP in the first place. if dtml is to be phased out, Zope will be less attractive for new users then soon will be irrelevant no matter how sophisticated and advanced it may become. ismet On 5/27/05, Greg Fischer <[EMAIL PROTECTED]> wrote: > I am just curious, why is DTML not good? It does 9 out of 10 things I > want quite easily. From my perspective, I really dont want to learn > new ways of doing things if this works. I also have no desire to do > templating. I can see the need for it in a large development shop,but > for me, a 1 guy operation, I have no desire to complicate things. > DTML works so easy for me. > > I do use Python scripts here and there for small and odd things that > would be difficult or impossible to do in DTML, but like I said, > that's maybe only 10% max of the functionality that I need to provide. > (probably 5-6%) Having to move everything in Python is a hassle that I > dont plan on doing for a few years. I'll just keep using Zope 2. > > I'd also be curious to know from all you other developers, what > percentage of tasks that you need to perform or functionality you need > to provide can be provided simply with DTML? Like for me, I can do > quickly and easily do 90% of what I need in DTML. > > Is DTML really that much harder to use? > > I understand the whole idea of separating the logic and the > presentation, and I guess, is that part of the reason why DTML is not > as good? But, for me, that separation is more complicated. DTML is > easier for me. (partly because I know it) > > I dont know, DTML and the "everythings an object" concept in Zope are > the very things that make Zope so attractive for a small time operator > like me. I hate to see them deprecated just because it doesnt work > for the larger companies out there. Of course, I may be totally > ignorant about all this, huh? > > Anyway, starting to ramble... Thanks for any thoughts. > Greg > > On 5/26/05, Hugo Ramos <[EMAIL PROTECTED]> wrote: > > Yellow, > > > > I have the same feeling... Python should be the primary language used > > in Zope but let's not just cut the support on DTML leaving thousands > > out there spinning around and having to go into Python as fast as they > > can because DTML is not supported anymore. > > Changes take time... Getting used to Python only in Zope takes time... > > and I'm not so sure the employers out there are that kind allowing > > everybody to take time making the move. > > > > > > Regards > > Hugo > > > > > > On 5/26/05, David H <[EMAIL PROTECTED]> wrote: > > > Hugo Ramos wrote: > > > > > > >Yellow, > > > > > > > >I think because of lazy people like me that prefer to use DTML in a > > > >fast way than go into a deep Python level to get the job done... > > > >I know that, eventually, one of these days I'll have to move on to > > > >Python only but until that day comes... DTML and a little bit of > > > >Python where needed suits me fine! :-) > > > > > > > >Regards > > > >Hugo > > > > > > > > > > > > > > > Hugo, > > > I figured as a dtml "wiz" a few years ago. Now I can't image doing > > > w/out python scripts and suddenly DTML gives me a headache. I do think > > > that DTML deserves a Hall of Fame Award but its time to move on. > > > > > > David > > > > > > > > > > > > > > > > > > -- > > Hugo Ramos - [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 ) > > > > > -- > Greg Fischer > 1st Byte Solutions > http://www.1stbyte.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 )
Re: [Zope] DTML in Zope 2 vs Zope 3
Andrew Milton wrote: +---[ Jonathan Cyr ]-- | Damn users, using all this imperfect software. These Kids Today! ;-) | | Easy Big Fella, Whooa. | You must be new here We've all learnt to ignore Chris... He gets easily confused... or maybe he doesn't take his medication... not sure, but, ignoring him generally works for the best d8) Actually as a member of "scorched by Chris club" I find his acid wit funny. Plus he has contributed alot to the community and has answered endless questions. David ___ 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] DTML in Zope 2 vs Zope 3
+---[ Jonathan Cyr ]-- | Damn users, using all this imperfect software. These Kids Today! ;-) | | Easy Big Fella, Whooa. | You must be new here We've all learnt to ignore Chris... He gets easily confused... or maybe he doesn't take his medication... not sure, but, ignoring him generally works for the best d8) -- Andrew Milton [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] DTML in Zope 2 vs Zope 3
Damn users, using all this imperfect software. These Kids Today! ;-) Easy Big Fella, Whooa. -Jon Chris Withers wrote: Tino Wildenhain wrote: Unfortunately Plone is still a bad example for ZPT. It is getting better but still it has a lot of code and definition in the templates. Maybe AT would be a way out. AT? As in ArcheTypes? You ARE kidding right? I've never seen such bad code, and in particular, abuse of ZPT in my entire life... And DTML sux, you wanna use it, fine, that says something about you. Use ZClasses, Plone, AT and XUF at the same time while you're at it. Why not dig out LoginManager and ZPatterns too, just for good measure? Hell, why not just do us all a favour and switch to using Perl where you'll be s much happier, and everyone in the community will agree with you rather than trying to help you not shoot yourself in the foot ;-) cheers, Chris ___ 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] DTML in Zope 2 vs Zope 3
Ah you are right. Just occured to me. That is kind of a pain in DTML, but I've learned how to deal with it. Makes sense. If I already have an object, say from a form submitted, in the REQUEST namespace, and I then retrieve data from sql and a column has the same name, I will have an issue. Which one is going to display in my var? I deal with this particular issue by changing my zsql method to return the column name differently, but there are other times when this may arise and it is a problem. And this causes you to have to do a bunch of messy dtml-call REQUEST.set's to set your vars correctly. I have learned how to deal with these things, but you are right, this is a problem with DTML and I can see how this exact issue helps make DTML messy and a little confusing. Great point. Thanks. Greg On 5/27/05, Lennart Regebro <[EMAIL PROTECTED]> wrote: > On 5/27/05, Greg Fischer <[EMAIL PROTECTED]> wrote: > > Well, aside from the fact that you cant use DTML in WYSIWYG editors, I > > still dont understand why it is not good. > > Well, the fact that you get everyting directly into the current > namespace, especially with DTML-in, and things like that, is the real > problem. But as noted, by making all data-gathering in a python > script, the problems with this are less and survivable. > > -- > Lennart Regebro, Nuxeo http://www.nuxeo.com/ > CPS Content Management http://www.cps-project.org/ > -- Greg Fischer 1st Byte Solutions http://www.1stbyte.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] DTML in Zope 2 vs Zope 3
On 5/27/05, Greg Fischer <[EMAIL PROTECTED]> wrote: > Well, aside from the fact that you cant use DTML in WYSIWYG editors, I > still dont understand why it is not good. Well, the fact that you get everyting directly into the current namespace, especially with DTML-in, and things like that, is the real problem. But as noted, by making all data-gathering in a python script, the problems with this are less and survivable. -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ 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] DTML in Zope 2 vs Zope 3
Using DTML from WYSIWYG editors is definitely a drawback. But, how many of us use them for doing our work? I might use Dreamweaver to clean up my sliced web template, but soon as I start my Zope work, it's all Crimson Editor coding by hand to Zope. Using Dreamweaver actually slows me down, it's easier to just code it. However, from a newbie perspective, not being able to run my Zope content in my fancy, drag'n'drop editor really bugged me a long time a go. Saying DTML sucks is only stating your difference of oppinion. At least give us some insight as to why it sucks. Technical, usability, or even marketing reasons would be helpful. But, come on DUH? Everybody will have their preference of languages, and even the way they like to layout the code. So I understand that some of us like DTML and some dont. All that aside, DTML may be ugly, but I dont agree. I guess beauty is in the eye of the beholder. :) Well, aside from the fact that you cant use DTML in WYSIWYG editors, I still dont understand why it is not good. If it is simple, easy to use, and it does the job, and I suppose, if you prefer it, why is it not good to use? I've beaten this subject to death, so time to move on. Thanks for hearing me out. Greg On 5/27/05, Lennart Regebro <[EMAIL PROTECTED]> wrote: > On 5/26/05, Greg Fischer <[EMAIL PROTECTED]> wrote: > > Is DTML really that much harder to use? > > Nah, but it's uglier. Also, the idea is that a web editor that > confirms to the tsandard of ignoring things it doens't understand, > should in theory be usable with TAL, but not with DTML. In practice, > however, HTML editors don't do that. > > > I understand the whole idea of separating the logic and the > > presentation, and I guess, is that part of the reason why DTML is not > > as good? > > Well, it used to be. But logic crept into ZPTs as well. The good thing > is to set up all the data in a python script or python method, and > then use the template only to display this data. Zope3 has this > separation "built-in", when you create a page with a template it > automatically gets connected to a "view" which is a python class, and > you can specify your own custom view and set up the data there. > > In Zope 2 you have to call a script that creates the data, or > reversely, use the script as the main view and let it call the > template. (I don't know how easy that last thing is with DTML, but the > first one works). > > If you do this, the drawbacks of DTML becomes much less painful. > -- > Lennart Regebro, Nuxeo http://www.nuxeo.com/ > CPS Content Management http://www.cps-project.org/ > -- Greg Fischer 1st Byte Solutions http://www.1stbyte.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] DTML in Zope 2 vs Zope 3
On 5/26/05, Greg Fischer <[EMAIL PROTECTED]> wrote: > Is DTML really that much harder to use? Nah, but it's uglier. Also, the idea is that a web editor that confirms to the tsandard of ignoring things it doens't understand, should in theory be usable with TAL, but not with DTML. In practice, however, HTML editors don't do that. > I understand the whole idea of separating the logic and the > presentation, and I guess, is that part of the reason why DTML is not > as good? Well, it used to be. But logic crept into ZPTs as well. The good thing is to set up all the data in a python script or python method, and then use the template only to display this data. Zope3 has this separation "built-in", when you create a page with a template it automatically gets connected to a "view" which is a python class, and you can specify your own custom view and set up the data there. In Zope 2 you have to call a script that creates the data, or reversely, use the script as the main view and let it call the template. (I don't know how easy that last thing is with DTML, but the first one works). If you do this, the drawbacks of DTML becomes much less painful. -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ 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] DTML in Zope 2 vs Zope 3
On 5/27/05, Chris Withers <[EMAIL PROTECTED]> wrote: > AT? As in ArcheTypes? You ARE kidding right? I've never seen such bad > code, and in particular, abuse of ZPT in my entire life... > > And DTML sux, you wanna use it, fine, that says something about you. Use > ZClasses, Plone, AT and XUF at the same time while you're at it. Why not > dig out LoginManager and ZPatterns too, just for good measure? > > Hell, why not just do us all a favour and switch to using Perl where > you'll be s much happier, and everyone in the community will agree > with you rather than trying to help you not shoot yourself in the foot ;-) Is it me or are you really pissed??? :-) At least give DTML some credit... It's what made Zope so popular in the first days because of easy and fast learning curve!!! Regards Hugo -- Hugo Ramos - [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] DTML in Zope 2 vs Zope 3
Tino Wildenhain wrote: Unfortunately Plone is still a bad example for ZPT. It is getting better but still it has a lot of code and definition in the templates. Maybe AT would be a way out. AT? As in ArcheTypes? You ARE kidding right? I've never seen such bad code, and in particular, abuse of ZPT in my entire life... And DTML sux, you wanna use it, fine, that says something about you. Use ZClasses, Plone, AT and XUF at the same time while you're at it. Why not dig out LoginManager and ZPatterns too, just for good measure? Hell, why not just do us all a favour and switch to using Perl where you'll be s much happier, and everyone in the community will agree with you rather than trying to help you not shoot yourself in the foot ;-) 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 )
Re: [Zope] DTML in Zope 2 vs Zope 3
Wow, thanks for the replies guys. It's good to hear I am not the only one who likes DTML. Tino, thanks for the explanations. I have some thoughts below on that, and keep in mind, I am questioning from my own ignorance. Tino Wrote: > The major drawbacks of DTML are: > > - one namespace (with transparent layers) One namespace? Why do you need more? I havent had any problems with one. Can you give some examples of why this is important or how it would be useful? > - confusing naming of tags, like which > really is or something Well I realize that it could be named something else, but it never occured to me. I dont think it's confusing. I mean, in DTML you use 4 tags more than any other, IN, VAR, IF, and CALL. Simple. And if there is one thing I have learned over the few years I have been programming, it is to keep it simple. Simple works. > - and the extra tags for flow control, but probably > the dtml fans can live with it. Yeah, simple. We can live with it, particularly since we can call more detailed functionality from Python. > - peoples practice to use even inside > html-tags attributes, where &dtml-foo; should be used. Hmm.. Never thought of that one as I too just use the full . I can see now that it might make readability a little better to use &dtml, but is there a technical reason for using it that way? Thank you again for your input Tino. I can understand the need to take Zope to another level, its the nature of things to keep them growing. And changing Zope to fit the needs of large scale applications is good, I just hate to see the sacrifice of the smaller apps needs. I probably will never get to work on enterprise class systems, in fact I really dont want to, but Zope works beautifully for the small web apps and that's what I want to work on. I wonder what the ratio is of Zope users who use small apps to those who do large apps? Thanks again! Greg On 5/26/05, Tino Wildenhain <[EMAIL PROTECTED]> wrote: > Am Freitag, den 27.05.2005, 00:20 +0200 schrieb Jaroslav Lukesh: > ... > > I absolutelly agree with you, it is like my words. > > > > But separation of logic and presentation could be done successfully in DTML > > too. ZPT, which have "separation argument" is not as easy to make totally > > This is even somewhat correct. If people had the discipline to not abuse > the templating to do complicated logic. > The major drawbacks of DTML are: > > - one namespace (with transparent layers) > - confusing naming of tags, like which > really is or something > - and the extra tags for flow control, but probably > the dtml fans can live with it. > - peoples practice to use even inside > html-tags attributes, where &dtml-foo; should be used. > > > separated design as marketing says, for example see Plone - try to customize > > plone site to absolutelly different custom design - it is near impossible. > > Unfortunately Plone is still a bad example for ZPT. It is getting > better but still it has a lot of code and definition in the templates. > Maybe AT would be a way out. > > ___ > 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 ) > -- Greg Fischer 1st Byte Solutions http://www.1stbyte.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] DTML in Zope 2 vs Zope 3
Am Freitag, den 27.05.2005, 00:20 +0200 schrieb Jaroslav Lukesh: ... > I absolutelly agree with you, it is like my words. > > But separation of logic and presentation could be done successfully in DTML > too. ZPT, which have "separation argument" is not as easy to make totally This is even somewhat correct. If people had the discipline to not abuse the templating to do complicated logic. The major drawbacks of DTML are: - one namespace (with transparent layers) - confusing naming of tags, like which really is or something - and the extra tags for flow control, but probably the dtml fans can live with it. - peoples practice to use even inside html-tags attributes, where &dtml-foo; should be used. > separated design as marketing says, for example see Plone - try to customize > plone site to absolutelly different custom design - it is near impossible. Unfortunately Plone is still a bad example for ZPT. It is getting better but still it has a lot of code and definition in the templates. Maybe AT would be a way out. ___ 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] DTML in Zope 2 vs Zope 3
I agree, I find DTML great and s simple and clear. I wonder why Zopeheads hate this so much! Remy On 5/26/05, Jonathan Cyr <[EMAIL PROTECTED]> wrote: > I use DTML alot, I also code all my HTML/CSS by hand for control sake. If > you use a Dreamweaver, et al, DTML requires tool tweaking, if it works at > all. If you read HTML, and are aware of all of the browser quirks, DTML is > quick and easy... New tags are easy, they stand out and quite common... > ASP, PHP, Cold Fusion and more... and I found DTML to be a nicely thought > out tagging extension of HTML. > > I keep my display logic in DTML and do scripting in PythonScripts. I never > had a great reason to get into ZPT, it didn't add any value for me with my > HTML background. Probably the 90/10 split as well. > > DTML works fine in Homesite. Never cared for the WYSIWIG tools. > > Two Cents, > > -Jon > [EMAIL PROTECTED] > > Greg Fischer wrote: > I am just curious, why is DTML not good? It does 9 out of 10 things I want > quite easily. From my perspective, I really dont want to learn new ways of > doing things if this works. I also have no desire to do templating. I can > see the need for it in a large development shop,but for me, a 1 guy > operation, I have no desire to complicate things. DTML works so easy for > me. I do use Python scripts here and there for small and odd things > that would be difficult or impossible to do in DTML, but like I said, that's > maybe only 10% max of the functionality that I need to provide. (probably > 5-6%) Having to move everything in Python is a hassle that I dont plan on > doing for a few years. I'll just keep using Zope 2. I'd also be curious to > know from all you other developers, what percentage of tasks that you need > to perform or functionality you need to provide can be provided simply with > DTML? Like for me, I can do quickly and easily do 90% of what I need in > DTML. Is DTML really that much harder to use? I understand the whole idea > of separating the logic and the presentation, and I guess, is that part of > the reason why DTML is not as good? But, for me, that separation is more > complicated. DTML is easier for me. (partly because I know it) I dont know, > DTML and the "everythings an object" concept in Zope are the very things > that make Zope so attractive for a small time operator like me. I hate to > see them deprecated just because it doesnt work for the larger companies out > there. Of course, I may be totally ignorant about all this, huh? Anyway, > starting to ramble... Thanks for any thoughts. Greg On 5/26/05, Hugo Ramos > <[EMAIL PROTECTED]> wrote: > Yellow, I have the same feeling... Python should be the primary language > used in Zope but let's not just cut the support on DTML leaving > thousands out there spinning around and having to go into Python as fast as > they can because DTML is not supported anymore. Changes take time... Getting > used to Python only in Zope takes time... and I'm not so sure the employers > out there are that kind allowing everybody to take time making the > move. Regards Hugo On 5/26/05, David H <[EMAIL PROTECTED]> wrote: > Hugo Ramos wrote: > Yellow, I think because of lazy people like me that prefer to use DTML in > a fast way than go into a deep Python level to get the job done... I know > that, eventually, one of these days I'll have to move on to Python only but > until that day comes... DTML and a little bit of Python where needed suits > me fine! :-) Regards Hugo > Hugo, I figured as a dtml "wiz" a few years ago. Now I can't image > doing w/out python scripts and suddenly DTML gives me a headache. I do > think that DTML deserves a Hall of Fame Award but its time to move > on. David > -- Hugo Ramos - > [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 ) > > > ___ 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] DTML in Zope 2 vs Zope 3
I use DTML alot, I also code all my HTML/CSS by hand for control sake. If you use a Dreamweaver, et al, DTML requires tool tweaking, if it works at all. If you read HTML, and are aware of all of the browser quirks, DTML is quick and easy... New tags are easy, they stand out and quite common... ASP, PHP, Cold Fusion and more... and I found DTML to be a nicely thought out tagging extension of HTML. I keep my display logic in DTML and do scripting in PythonScripts. I never had a great reason to get into ZPT, it didn't add any value for me with my HTML background. Probably the 90/10 split as well. DTML works fine in Homesite. Never cared for the WYSIWIG tools. Two Cents, -Jon [EMAIL PROTECTED] Greg Fischer wrote: I am just curious, why is DTML not good? It does 9 out of 10 things I want quite easily. From my perspective, I really dont want to learn new ways of doing things if this works. I also have no desire to do templating. I can see the need for it in a large development shop,but for me, a 1 guy operation, I have no desire to complicate things. DTML works so easy for me. I do use Python scripts here and there for small and odd things that would be difficult or impossible to do in DTML, but like I said, that's maybe only 10% max of the functionality that I need to provide. (probably 5-6%) Having to move everything in Python is a hassle that I dont plan on doing for a few years. I'll just keep using Zope 2. I'd also be curious to know from all you other developers, what percentage of tasks that you need to perform or functionality you need to provide can be provided simply with DTML? Like for me, I can do quickly and easily do 90% of what I need in DTML. Is DTML really that much harder to use? I understand the whole idea of separating the logic and the presentation, and I guess, is that part of the reason why DTML is not as good? But, for me, that separation is more complicated. DTML is easier for me. (partly because I know it) I dont know, DTML and the "everythings an object" concept in Zope are the very things that make Zope so attractive for a small time operator like me. I hate to see them deprecated just because it doesnt work for the larger companies out there. Of course, I may be totally ignorant about all this, huh? Anyway, starting to ramble... Thanks for any thoughts. Greg On 5/26/05, Hugo Ramos <[EMAIL PROTECTED]> wrote: Yellow, I have the same feeling... Python should be the primary language used in Zope but let's not just cut the support on DTML leaving thousands out there spinning around and having to go into Python as fast as they can because DTML is not supported anymore. Changes take time... Getting used to Python only in Zope takes time... and I'm not so sure the employers out there are that kind allowing everybody to take time making the move. Regards Hugo On 5/26/05, David H <[EMAIL PROTECTED]> wrote: Hugo Ramos wrote: Yellow, I think because of lazy people like me that prefer to use DTML in a fast way than go into a deep Python level to get the job done... I know that, eventually, one of these days I'll have to move on to Python only but until that day comes... DTML and a little bit of Python where needed suits me fine! :-) Regards Hugo Hugo, I figured as a dtml "wiz" a few years ago. Now I can't image doing w/out python scripts and suddenly DTML gives me a headache. I do think that DTML deserves a Hall of Fame Award but its time to move on. David -- Hugo Ramos - [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] DTML in Zope 2 vs Zope 3
Dne čtvrtek, 26. května 2005 22:03 Greg Fischer <[EMAIL PROTECTED]> napsal(a): > I am just curious, why is DTML not good? It does 9 out of 10 things I > want quite easily. From my perspective, I really dont want to learn > new ways of doing things if this works. I also have no desire to do > templating. I can see the need for it in a large development shop,but > for me, a 1 guy operation, I have no desire to complicate things. > DTML works so easy for me. > > I do use Python scripts here and there for small and odd things that > would be difficult or impossible to do in DTML, but like I said, > that's maybe only 10% max of the functionality that I need to provide. > (probably 5-6%) Having to move everything in Python is a hassle that I > dont plan on doing for a few years. I'll just keep using Zope 2. > > I'd also be curious to know from all you other developers, what > percentage of tasks that you need to perform or functionality you need > to provide can be provided simply with DTML? Like for me, I can do > quickly and easily do 90% of what I need in DTML. > > Is DTML really that much harder to use? > > I understand the whole idea of separating the logic and the > presentation, and I guess, is that part of the reason why DTML is not > as good? But, for me, that separation is more complicated. DTML is > easier for me. (partly because I know it) > > I dont know, DTML and the "everythings an object" concept in Zope are > the very things that make Zope so attractive for a small time operator > like me. I hate to see them deprecated just because it doesnt work > for the larger companies out there. Of course, I may be totally > ignorant about all this, huh? I absolutelly agree with you, it is like my words. But separation of logic and presentation could be done successfully in DTML too. ZPT, which have "separation argument" is not as easy to make totally separated design as marketing says, for example see Plone - try to customize plone site to absolutelly different custom design - it is near impossible. -- Jaroslav Lukesh --- This e-mail can not contain any viruses because I use Linux ___ 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] DTML in Zope 2 vs Zope 3
Greg Fischer wrote: I am just curious, why is DTML not good? It does 9 out of 10 things I want quite easily. From my perspective, I really dont want to learn new ways of doing things if this works. I also have no desire to do templating. I can see the need for it in a large development shop,but for me, a 1 guy operation, I have no desire to complicate things. DTML works so easy for me. I do use Python scripts here and there for small and odd things that would be difficult or impossible to do in DTML, but like I said, that's maybe only 10% max of the functionality that I need to provide. (probably 5-6%) Having to move everything in Python is a hassle that I dont plan on doing for a few years. I'll just keep using Zope 2. I'd also be curious to know from all you other developers, what percentage of tasks that you need to perform or functionality you need to provide can be provided simply with DTML? Like for me, I can do quickly and easily do 90% of what I need in DTML. Is DTML really that much harder to use? I understand the whole idea of separating the logic and the presentation, and I guess, is that part of the reason why DTML is not as good? But, for me, that separation is more complicated. DTML is easier for me. (partly because I know it) I dont know, DTML and the "everythings an object" concept in Zope are the very things that make Zope so attractive for a small time operator like me. I hate to see them deprecated just because it doesnt work for the larger companies out there. Of course, I may be totally ignorant about all this, huh? Anyway, starting to ramble... Thanks for any thoughts. Greg On 5/26/05, Hugo Ramos <[EMAIL PROTECTED]> wrote: Yellow, I have the same feeling... Python should be the primary language used in Zope but let's not just cut the support on DTML leaving thousands out there spinning around and having to go into Python as fast as they can because DTML is not supported anymore. Changes take time... Getting used to Python only in Zope takes time... and I'm not so sure the employers out there are that kind allowing everybody to take time making the move. Regards Hugo On 5/26/05, David H <[EMAIL PROTECTED]> wrote: Hugo Ramos wrote: Yellow, I think because of lazy people like me that prefer to use DTML in a fast way than go into a deep Python level to get the job done... I know that, eventually, one of these days I'll have to move on to Python only but until that day comes... DTML and a little bit of Python where needed suits me fine! :-) Regards Hugo Hugo, I figured as a dtml "wiz" a few years ago. Now I can't image doing w/out python scripts and suddenly DTML gives me a headache. I do think that DTML deserves a Hall of Fame Award but its time to move on. David - Greg, I agree with you: I would not convert existing code to ZPT unless a client asked me to. I too, am a "one man shop" - been doing it that way for like 14 years. I just made the decision to use ZPT for all *new* projects. I didn't like it much at the beginning but now I wouldnt do w/out it. ZPT has a magic of its own, its amazing! Plus, it seems to do force the mind to think in ways compatible with the direction of web developement evolution. The problem with DTML is its too good for, well, its own good. :-D All best, David ___ 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] DTML in Zope 2 vs Zope 3
I am just curious, why is DTML not good? It does 9 out of 10 things I want quite easily. From my perspective, I really dont want to learn new ways of doing things if this works. I also have no desire to do templating. I can see the need for it in a large development shop,but for me, a 1 guy operation, I have no desire to complicate things. DTML works so easy for me. I do use Python scripts here and there for small and odd things that would be difficult or impossible to do in DTML, but like I said, that's maybe only 10% max of the functionality that I need to provide. (probably 5-6%) Having to move everything in Python is a hassle that I dont plan on doing for a few years. I'll just keep using Zope 2. I'd also be curious to know from all you other developers, what percentage of tasks that you need to perform or functionality you need to provide can be provided simply with DTML? Like for me, I can do quickly and easily do 90% of what I need in DTML. Is DTML really that much harder to use? I understand the whole idea of separating the logic and the presentation, and I guess, is that part of the reason why DTML is not as good? But, for me, that separation is more complicated. DTML is easier for me. (partly because I know it) I dont know, DTML and the "everythings an object" concept in Zope are the very things that make Zope so attractive for a small time operator like me. I hate to see them deprecated just because it doesnt work for the larger companies out there. Of course, I may be totally ignorant about all this, huh? Anyway, starting to ramble... Thanks for any thoughts. Greg On 5/26/05, Hugo Ramos <[EMAIL PROTECTED]> wrote: > Yellow, > > I have the same feeling... Python should be the primary language used > in Zope but let's not just cut the support on DTML leaving thousands > out there spinning around and having to go into Python as fast as they > can because DTML is not supported anymore. > Changes take time... Getting used to Python only in Zope takes time... > and I'm not so sure the employers out there are that kind allowing > everybody to take time making the move. > > > Regards > Hugo > > > On 5/26/05, David H <[EMAIL PROTECTED]> wrote: > > Hugo Ramos wrote: > > > > >Yellow, > > > > > >I think because of lazy people like me that prefer to use DTML in a > > >fast way than go into a deep Python level to get the job done... > > >I know that, eventually, one of these days I'll have to move on to > > >Python only but until that day comes... DTML and a little bit of > > >Python where needed suits me fine! :-) > > > > > >Regards > > >Hugo > > > > > > > > > > > Hugo, > > I figured as a dtml "wiz" a few years ago. Now I can't image doing > > w/out python scripts and suddenly DTML gives me a headache. I do think > > that DTML deserves a Hall of Fame Award but its time to move on. > > > > David > > > > > > > > > > > -- > Hugo Ramos - [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 ) > -- Greg Fischer 1st Byte Solutions http://www.1stbyte.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] DTML in Zope 2 vs Zope 3
Yellow, I have the same feeling... Python should be the primary language used in Zope but let's not just cut the support on DTML leaving thousands out there spinning around and having to go into Python as fast as they can because DTML is not supported anymore. Changes take time... Getting used to Python only in Zope takes time... and I'm not so sure the employers out there are that kind allowing everybody to take time making the move. Regards Hugo On 5/26/05, David H <[EMAIL PROTECTED]> wrote: > Hugo Ramos wrote: > > >Yellow, > > > >I think because of lazy people like me that prefer to use DTML in a > >fast way than go into a deep Python level to get the job done... > >I know that, eventually, one of these days I'll have to move on to > >Python only but until that day comes... DTML and a little bit of > >Python where needed suits me fine! :-) > > > >Regards > >Hugo > > > > > > > Hugo, > I figured as a dtml "wiz" a few years ago. Now I can't image doing > w/out python scripts and suddenly DTML gives me a headache. I do think > that DTML deserves a Hall of Fame Award but its time to move on. > > David > > > > -- Hugo Ramos - [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] DTML in Zope 2 vs Zope 3
Hugo Ramos wrote: Yellow, I think because of lazy people like me that prefer to use DTML in a fast way than go into a deep Python level to get the job done... I know that, eventually, one of these days I'll have to move on to Python only but until that day comes... DTML and a little bit of Python where needed suits me fine! :-) Regards Hugo Hugo, I figured as a dtml "wiz" a few years ago. Now I can't image doing w/out python scripts and suddenly DTML gives me a headache. I do think that DTML deserves a Hall of Fame Award but its time to move on. David ___ 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] DTML in Zope 2 vs Zope 3
Yellow, I think because of lazy people like me that prefer to use DTML in a fast way than go into a deep Python level to get the job done... I know that, eventually, one of these days I'll have to move on to Python only but until that day comes... DTML and a little bit of Python where needed suits me fine! :-) Regards Hugo On 5/25/05, Chris Withers <[EMAIL PROTECTED]> wrote: > David H wrote: > > > > I understand that DTML will be in Zope 3. My question is, do > > "namespaces" and "context" also migrate to Zope 3? If not, could break > > existing code? > > I would suggest that the chances of any DTML from Zope 2 working in Zope > 3 are slim, at best ;-) > > Why DTML is IN Zope 3 in the first place is totally beyond me... > > 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 ) > -- Hugo Ramos - [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] DTML in Zope 2 vs Zope 3
David H wrote: I understand that DTML will be in Zope 3. My question is, do "namespaces" and "context" also migrate to Zope 3? If not, could break existing code? I would suggest that the chances of any DTML from Zope 2 working in Zope 3 are slim, at best ;-) Why DTML is IN Zope 3 in the first place is totally beyond me... 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] dtml-in sql => dtml-in anything?
+---[ Joh Johannsen ]-- | | I'd like to just have the external method return exactly the same thing | as the ZSQL, but I'm having some problem finding what format (if any) | that is. | | Is this sort of thing even possible? You'll need to look at the ResultSet class that is used by ZSQL Methods and ZCatalogs amongst other thing. Once you know how they work, it's pretty easy to use them. -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in: total??
Edwin Martin writes: > I'm making a generic DTML-method which shows a bar like > AltaVista does: > > [ < previous] [1] [2] [3] [4] [next > ] > > I need to know the number of rows the database returned. > > In appendix A of the Zope book, I see I can use total-name etc. > > How can I get the total number of rows, independent of > column names? > > Can I do it without rewriting the SQL-queries? You can. It is even prepared for you: "dtml-in" defines variables "previous-batches" and "next-batches" describing all previous and following batches. It you do not like this prepared solution, you can use "sequence-length", another "dtml-in" defined variable, to access the length of the sequence. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in: total??
- Original Message - From: "Edwin Martin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 02, 2001 7:23 AM Subject: [Zope] dtml-in: total?? > Hello, > > I'm making a generic DTML-method which shows a bar like > AltaVista does: > > [ < previous] [1] [2] [3] [4] [next > ] > > I need to know the number of rows the database returned. > > In appendix A of the Zope book, I see I can use total-name etc. > > How can I get the total number of rows, independent of > column names? > > Can I do it without rewriting the SQL-queries? > > Bye, > Edwin Martin. > > --- > The world is moving so fast these days that the person who says > it can't be done is generally interrupted by someone doing it. > -- Harry Emerson Fosdick > > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) > > ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in over the output from my method
- Original Message - From: Max M <[EMAIL PROTECTED]> To: Tim Hicks <[EMAIL PROTECTED]>; Zope@Zope. Org <[EMAIL PROTECTED]> Sent: Monday, November 06, 2000 9:48 PM Subject: RE: [Zope] dtml-in over the output from my method > > def list_messages(self): > > class msg: > def __init__(self, msgnum, msgfrom, msgsub): > self.msgnum = msgnum > self.msgfrom = msgfrom > self.msgsub = msgsub > > msgList = [] > lr = open(self.user_dir+'/msg_list', 'r') > spl = re.compile('\s\|\s') > for msg_line in lr.readline(): > num_from_sub = [] > num_from_sub = spl.split(msg_line, 2) > > # Oh no ... this wont cut it! > #self.msgnum = num_from_sub[0] > #self.msgfrom = 'This is from UNKNOWN' > #self.msgsub = 'My special subject' > #return self.msgnum, self.msgfrom, self.msgsub > > # Do it like this: > msgList.append(msg(num_from_sub[0],'This is from UNKNOWN', >'My special subject')) > return msgList > > Brilliant, it works a treat. Thanks very much. tim ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in over the output from my method
The problem is the first time your for loop runs it will return to the dtml and will not run anymore. Rather build up a list, or list of objects inside your method and then return. Dtml-in needs to see a list. -- Andy McKay, Developer. ActiveState. - Original Message - From: "Tim Hicks" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 06, 2000 12:45 PM Subject: [Zope] dtml-in over the output from my method I am trying to create a zope product in python but have got stuck with using the dtml-in tag to iterate over a method (or is it a function? I get a little mixed up) of my class. Here is the method, def list_messages(self): lr = open(self.user_dir+'/msg_list', 'r') spl = re.compile('\s\|\s') for msg_line in lr.readline(): num_from_sub = [] num_from_sub = spl.split(msg_line, 2) print num_from_sub self.msgnum = num_from_sub[0] self.msgfrom = 'This is from UNKNOWN' self.msgsub = 'My special subject' return self.msgnum, self.msgfrom, self.msgsub And here is an extract from the dtml file that is supposed to display the output, &dtml-msgfrom; &dtml-msgsub; However, this does not produce the desired effect. I don't know if it is obvious from what I've written, but basically, the three variables (self.msgnum, self.msgfrom and self.msgsub) are supposed to be inserted into the appropriate place in the table, and then the 'for' statement re-executed (producing different values for the variables) with the subsequent values being inserted into the next line of the table etc... until there are no more lines to be read from lr. I'm not sure if that is clear or not, sorry. Obviously, this does not work as the dtml-in simply iterates over each of the returned variables (instead of over the for statement). I can't seem to make it do what I want. Does anyone have any ideas? Much obliged if you do. Cheers tim ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] dtml-in over the output from my method
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Tim Hicks >I am trying to create a zope product in python but have got stuck with using the >dtml-in tag to iterate over a method (or is it a function? I get a little mixed >up) of my class. Here is the method, def list_messages(self): msgList = [] lr = open(self.user_dir+'/msg_list', 'r') spl = re.compile('\s\|\s') for msg_line in lr.readline(): num_from_sub = [] num_from_sub = spl.split(msg_line, 2) print num_from_sub self.msgnum = num_from_sub[0] self.msgfrom = 'This is from UNKNOWN' self.msgsub = 'My special subject' return self.msgnum, self.msgfrom, self.msgsub return msgList The dtml-in does not call your method for every iteration, it just calls once and then expects a list in return. What you need to do is to create a method that returns a list of objects: def list_messages(self): class msg: def __init__(self, msgnum, msgfrom, msgsub): self.msgnum = msgnum self.msgfrom = msgfrom self.msgsub = msgsub msgList = [] lr = open(self.user_dir+'/msg_list', 'r') spl = re.compile('\s\|\s') for msg_line in lr.readline(): num_from_sub = [] num_from_sub = spl.split(msg_line, 2) # Oh no ... this wont cut it! #self.msgnum = num_from_sub[0] #self.msgfrom = 'This is from UNKNOWN' #self.msgsub = 'My special subject' #return self.msgnum, self.msgfrom, self.msgsub # Do it like this: msgList.append(msg(num_from_sub[0],'This is from UNKNOWN', 'My special subject')) return msgList ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in returning null
Diego, Do you mean that you want at least one input tag appearing at all times? If so, try this: "> "> hth Phil - Original Message - From: "Diego Rodrigo Neufert" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 24, 2000 4:24 PM Subject: [Zope] dtml-in returning null | Hi... | | I want to do something like this... | | | "> | | But, if InMethod return nothing it display this tag one time | | There's a way to do that?? | | Thanks | -- | --- | Diego Rodrigo Neufert | -webmaster | --- | (Magic Web Design) | (email) ([EMAIL PROTECTED]) | (curitiba) (pr) | | ___ | Zope maillist - [EMAIL PROTECTED] | http://lists.zope.org/mailman/listinfo/zope | ** No cross posts or HTML encoding! ** | (Related lists - | http://lists.zope.org/mailman/listinfo/zope-announce | http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] dtml-in returning null
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Diego Rodrigo Neufert > > "> > > But, if InMethod return nothing it display this tag one time >There's a way to do that?? "> will probably suffice Max M. W. Rasmussen,Denmark. New Media Director private: [EMAIL PROTECTED] work: [EMAIL PROTECTED] - Specialization is for insects. - Robert A. Heinlein ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] dtml-in loop to capture records
> Okay, this works fine, in MOST of my forms, but I have other forms where > this doesnt work at all and I get errors saying that the ITEM is a bad > request. I dont get it, what am I missing here that this works some > places and in other places with almost identical syntax, it falls over. I came across this error today. (The problem may not be the same.) In our case it occurred because the SQL, whilst well-formed and valid, violated a database constraint - was trying to put zero length strings into fields of a table where this was not allowed. The problem was tracked down by firstly displaying the request data using: then trying to input the same data manually. HTH, Richard ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Réf . : Re: [ Zope ] dtml-in
(keep copying to the list so other people can jump in and help) [EMAIL PROTECTED] wrote: > > thks a lot for your answer. It works, but I've a lot of dtml documents in > my folder, and it's tooo slow with the sequence-item tag > (less than one seconde with , and more than 10 secondes, with > . Do you know any explaination about that ??? Of course ;-) is rendering a single string. goes through and renders each whole document, which takes a lot longer... cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in
[EMAIL PROTECTED] wrote: > But I was only able to print the name of the dtml document, how can I > execute the script write in the dtml document ? The following should do it: cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in loop to capture records
Paul Zwarts writes: > ... bad request exception from SQL method ... This error indicates, that an input parameter was not provided. The error value gives the list of all missing input parameters. I would suggest, you replace your "SQL method" (the complete "dtml-in") with "" and analyse what form variables do arrive. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] [Fwd: Re: [Zope] dtml-in loop to capture records]
Me again, To further explain my dilemna, I just noticed that using the in ITEM loop doesnt seem to work if the dtml-call statement has an extra parameter. I had publish.. ... ... Then use as in other working forms: publish.. ... ... Mdate is the primary key, again. This gave me the ITEM Bad Request error. Now, if I remove the mdate call, and remove the condition in the ZSQL method, i can at least now get an error: File /var/Zope-201/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__ (Object: ) File /var/Zope-201/lib/python/DocumentTemplate/DT_In.py, line 691, in renderwob (Object: item) File /var/Zope-201/lib/python/Shared/DC/ZRDB/sqlvar.py, line 168, in render (Object: vswitch) Missing Input: (see above) So, the item is rendering. The variable named item.vswitch is not... nor is mdate which had to be named as an item.mdate instead of being passed in the dtml-call statement as an argument. In forms where this works, i simply call the method and the item renders everything in properly. Now I can do none it seems. One other note is that I var in the form that the input item.fieldname parts are contained, so the calling method to render item is not the same document as the item components. Oi, -- Paz Oratrix Development BV http://www.oratrix.com GRiNS SMIL Editor - ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in theentiresite
peter be writes: > In the root > A DTML Method > > Some objects (mostly DTML Documents) have a property (boolean) that tells > whether this is a helppage or not. > What I want to do is to loop though eash and every object in the entire site > (not very big) and check if the object has this property. You can use "ZopeFind" (see the object reference on zdp.zope.org for a documentation) with obj_expr='_.hasattr(aq_explicit,"your_property")' You will need Zope 2.2.1 as older Zope version have a ZopeFind bug preventing this use. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in theentiresite
> Any other good solutions are welcomed! There are several 'Sitemap' solutions that do this more or less, but... Any reason you can't use a catalog for this and catalog on the property? This is much faster and much more flexible Rik ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in theentiresite
peter be wrote: > Some objects (mostly DTML Documents) have a property (boolean) that tells > whether this is a helppage or not. > What I want to do is to loop though eash and every object in the entire site > (not very big) and check if the object has this property. Does your site have any folderish objects in it? Doe you want to recurse abnd iterate through them? This should work unless you need to recurse: cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in and tuples
Chris Withers writes: > Why and how are python tuples (like, this) handled differently (and not > in a logical way I can see...) than python lists [like, this]? The "how" has been explained already. The "why" is only my guess: support for the widespread idiom ".items()", "objectItems" etc. Form the DTML reference: sequence-key The key associated with the element in an items sequence. An items sequence is a sequence of value pairs that represent a mapping from a key to a value. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in and tuples
Shane Hathaway wrote: > > I don't know of any place. It ought to be in the DTML reference. I guess I'll hope and wait for the Zope Book :-) cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in and tuples
Chris Withers wrote: > > Shane Hathaway wrote: > > Looking at the code, it appears that if you pass a list of two-element > > tuples, dtml-in will sort by the first element of each pair and render > > the second element. > > Unluckilly, that's exactly what I was passing it. But not the result I > was looking for :S > > > If, on the other hand, you pass a list of lists, it > > won't try to sort that way. > > Yeah, using just a list of length-two lists did the job :-) > > Can I be brave enough to ask why it does this and where it's documented > (other than the source ;-) I don't know of any place. It ought to be in the DTML reference. Shane ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in and tuples
Shane Hathaway wrote: > Looking at the code, it appears that if you pass a list of two-element > tuples, dtml-in will sort by the first element of each pair and render > the second element. Unluckilly, that's exactly what I was passing it. But not the result I was looking for :S > If, on the other hand, you pass a list of lists, it > won't try to sort that way. Yeah, using just a list of length-two lists did the job :-) Can I be brave enough to ask why it does this and where it's documented (other than the source ;-) cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in and tuples
Chris Withers wrote: > > "R. David Murray" wrote: > > > > On Mon, 14 Aug 2000, Jonothan Farr wrote: > > > Well in Python a list is mutable and a tuple is not. > > > > Right, but he's asking why dtml-in treats tuples in a special way, > > and exactly what that behavior is. > > That's right :-) > > ..and in particular why it's so weird. It seems to do something like use > return the last element of the tuple rather than return the tuple > object... Looking at the code, it appears that if you pass a list of two-element tuples, dtml-in will sort by the first element of each pair and render the second element. If, on the other hand, you pass a list of lists, it won't try to sort that way. Shane ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in and tuples
"R. David Murray" wrote: > > On Mon, 14 Aug 2000, Jonothan Farr wrote: > > Well in Python a list is mutable and a tuple is not. > > Right, but he's asking why dtml-in treats tuples in a special way, > and exactly what that behavior is. That's right :-) ..and in particular why it's so weird. It seems to do something like use return the last element of the tuple rather than return the tuple object... I'm just guessing though :S cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in and tuples
On Mon, 14 Aug 2000, Jonothan Farr wrote: > Well in Python a list is mutable and a tuple is not. Right, but he's asking why dtml-in treats tuples in a special way, and exactly what that behavior is. --RDM > - Original Message - > From: Chris Withers <[EMAIL PROTECTED]> > > Why and how are python tuples (like, this) handled differently (and not > > in a logical way I can see...) than python lists [like, this]? ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in and tuples
Well in Python a list is mutable and a tuple is not. --jfarr - Original Message - From: Chris Withers <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, August 14, 2000 3:38 PM Subject: [Zope] dtml-in and tuples > Hi, > > Why and how are python tuples (like, this) handled differently (and not > in a logical way I can see...) than python lists [like, this]? > > cheers, > > Chris > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) > ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in sort question
Jean Jordaan writes: > I'd like to sort bunch of objects, and this doesn't seem to > work: > > > > Should it work? How does one sort the results returned by an > expression such as the above? I think so. Does it not? I probably would use "objectValues" instead of "objectItems". "objectIdems" gives you a sequence of "id,value" pairs, "objectValues" gives you just the sequence of values. If your objects should not have an "id", the sort above would not work. In this case, you could try: Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in question
> I had the same problem and found out there is no way yet of making dtml-in > with multiple conditions. Instead I had to do dtml-if's and make my own > counter and previous/next attributes to handle the batches. > One way to simplify this is to use two dtml-in loops. The first one filters out the items you want to include, then the second one just displays all the items in the filtered loop. So instead of: messing around with counters and stuff goes here... You have something like: Put your real loop body here. The second sequence then has the correct counter, and you can use the next/prev batches on it as well if you want. When building the second sequence you have a choice of how to structure it. If you simple append sequence-item, this should work, unless the sequence items are two element tuples. If you append a tuple as shown this should work every time. It can also be useful to calculate a new key, for example if you wanted to sort the list on more than one field you could build a key from the sorted fields. The main downside to this scheme is that you have to process the whole list, which could be annoying if you just want a small batch from the front of a long list. -- Duncan Booth [EMAIL PROTECTED] int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3" "\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure? http://dales.rmplc.co.uk/Duncan ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in question
On Tue, 1 Aug 2000, Webmaster wrote: > I have a bunch of zClass instances and I want to display only the ones that > match all three criterion (approved=1, goLiveDate<=ZopeTime(), expired=0). One way to accomplish this is by using ZCatalog. Index those properties, and specify your selection criteria in the Catalog call. If the properties change a lot, though, you are going to increase the amount of data getting written to your FileStorage on each change. --RDM ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in question
Peter Arvidsson wrote: > I had the same problem and found out there is no way yet of making dtml-in with > multiple conditions. Instead I had to do dtml-if's and make my own counter and > previous/next attributes to handle the batches. A better way is to use a ZCatalog. Make your objects catalog-aware, set the catalog's indexes as appropriate to your multiple conditions, and use the catalog to do your query and your counting and batching of results. It ought to be much faster too. -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in question
Hi I had the same problem and found out there is no way yet of making dtml-in with multiple conditions. Instead I had to do dtml-if's and make my own counter and previous/next attributes to handle the batches. Peter Webmaster skrev: > I have a bunch of zClass instances and I want to display only the ones that > match all three criterion (approved=1, goLiveDate<=ZopeTime(), expired=0). > I'm not exactly sure how to do this. I have tried statements > inside the statements but the "in", even though it does > not show the files that don't match, still counts all of them which messes > up the next and previous. How do I write my code to correctly show and count > only the matching instances? > > I have searched both the zope.org site and the eGroups list for the answer > and if it is there I can't find it :-( > > Thanks!! > > Jamey > > Here is the code. > > reverse size="5" start="batch_start" next> > > href="&dtml-URL;&dtml-sequence-query;batch_start=&dtml-next-sequence-start-n > umber;"> > Next &dtml-next-sequence-size; older Releases > > > > reverse size="5" start="batch_start"> > > /release.html"> > &dtml-pr_title; > - > &dtml-summary; > > > > > reverse size="5" start="batch_start" previous> > > href="&dtml-URL;&dtml-sequence-query;batch_start=&dtml-previous-sequence-sta > rt-number;"> > Next &dtml-previous-sequence-size; more recent Releases > > > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in 'one record per page' problem
Dieter Maurer wrote: > > What does is mean: "presents only two pages"? Submitting the form gives the first page. Hitting the "next" link, gives another page, and no "next" link. > Probably, you get wrong navigation elements. > This would be due to a bug for "". > > There is a patch for this at > > URL:http://www.dieter.handshake.de/pyprojects/zope/dt_in.pat I have used the patche, and things looks good now. Thanks. > There was an announcement in this list around June 10, 2000. I think I have missed it... > AFAIK, the patch is integrated into Zope 2.2. I'm afraid to upgrade to Zope 2.2 right now. > You should use "orphan=0". "orphan=1" allows for one "orphan" to be > moved, i.e. you may get 2 records on a page. Again, thank you for this. The form is working now. []s -- César A. K. Grossmann [EMAIL PROTECTED] http://members.xoom.com/ckant/ http://www.halcyon.com/sciclub/cgi-pvt/instr/instr.html ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in syntax
A couple of different solutions depending on exactly what you want to do. if you're just trying to get the total length of the records returned by wherever you could try. or if you want the distinct values as well a great reference is the Zope Quick Reference at http://www.zope.org/Members/ZQR Check out the dtml-in docs. Kapil Kyle Burnett wrote: > > so i have this loop and i want to count a variable: > > > > > > > > > > but what i really want to count is specific values for id. so let's say > id=='value1', i want to try and do the following: > > > > > > > > > > but no luck. and i have tried several other make-shift syntaxes to no avail. > > i do have some other logic that i could use over the course of the loop to > determine the count of distinct values but i was try to do it in far less > code. > > anyone got an idea of how to rig this? > > thanks in advance, > kyle > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in 'one record per page' problem
Cesar A. K. Grossmann writes: > I'm using a report that must return one instance by page, but it's not > working very well... If the query returns more than one result, Zope > presents only two pages. I'm using Zope 2.1.6 in a Linux box. What does is mean: "presents only two pages"? Probably, you get wrong navigation elements. This would be due to a bug for "". There is a patch for this at URL:http://www.dieter.handshake.de/pyprojects/zope/dt_in.pat In fact, the patch does more (allows for uniform navigation elements at both start and end of sequence batch). There was an announcement in this list around June 10, 2000. AFAIK, the patch is integrated into Zope 2.2. > Here are a excerpt of the dtml code used: > > sqlQuery > size=1 > orphan=1 > You should use "orphan=0". "orphan=1" allows for one "orphan" to be moved, i.e. you may get 2 records on a page. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in syntax
Would this do it? : Cheers, Manuel On Sat, 29 Jul 2000, Tim Cook wrote: > Kyle Burnett wrote: > > > > so i have this loop and i want to count a variable: > > > > > > > > > > > > > > > > > > > > but what i really want to count is specific values for id. so let's say > > id=='value1', i want to try and do the following: > > > > > > > > > > > > > > > > > > > > but no luck. and i have tried several other make-shift syntaxes to no avail. > > > > i do have some other logic that i could use over the course of the loop to > > determine the count of distinct values but i was try to do it in far less > > code. > > This may be what you already thought of. It does require a lot of > code if you have several things to count. There may also be > cleaner ways to do it??? > > > > > > > > > I counted items. > > (of course this is untested). > > -- Tim Cook -- > FreePM Project Coordinator - http://www.freepm.org > OS Healthcare Alliance Supporter - http://www.oshca.org > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) > ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in syntax
Kyle Burnett wrote: > > so i have this loop and i want to count a variable: > > > > > > > > > > but what i really want to count is specific values for id. so let's say > id=='value1', i want to try and do the following: > > > > > > > > > > but no luck. and i have tried several other make-shift syntaxes to no avail. > > i do have some other logic that i could use over the course of the loop to > determine the count of distinct values but i was try to do it in far less > code. This may be what you already thought of. It does require a lot of code if you have several things to count. There may also be cleaner ways to do it??? I counted items. (of course this is untested). -- Tim Cook -- FreePM Project Coordinator - http://www.freepm.org OS Healthcare Alliance Supporter - http://www.oshca.org ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in and maps...
- Original Message - From: Curtis Maloney <[EMAIL PROTECTED]> > > I suppose that your var is a dictionary > > > Well.. this is where things start to get fun. (o8 > > I have a dirty great array along the lines of : > > [ [ 'string', 0, { 'name':'value' } ], [ 'string', 0, { 'name':'value' } ] ] > > (I love python.. the same thing in C/C++ would take HEAPS of work :) > > So, I iterate over the array... that's working fine... > Then, for each iteration, I handle the data however... > I wind up with: > > > > > > But that's where the problem begins. Yes in did the "_['sequence-item'][2]" is a dictionary. You can do like (untested :0) but why not without ... PM ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] DTML-IN Question
from the DTML reference page 41, regarding : the default setting for the orphan attribute is 3. So you might try: -- Jim Washington Tom Scheidt wrote: > > Hi my problem is that Im setting my batch size to 3, yet I keep getting > 5 items. As a matter of fact, sometimes I get 4 when asking for 2 and so on. > Here's what Im using: > [code snipped] > > Thanks in advance. > Tom Scheidt | www.falsemirror.com | [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] dtml-in Tag problem
A traceback is always helpful and would have been useful. Is it possible that there is a 3rd, empty item, or an item with no ^, in "related_stories"? An empty item when split would return only 1 subitem and your code is assuming you will always have two. A test for the ^ in the item before splitting would prevent this. Try this: ... ... Jim Sanford - Original Message - From: "Tom Scheidt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 22, 2000 3:58 PM Subject: [Zope] dtml-in Tag problem Related Stories gives me an error that says: "list index out of range" The related_stories property contains: King Kong website^www.kong.com Empire State Building Website^www.empirestate.com It worked at first but when I made any changes to other properties it gave me that error message. Any ideas? Tom Scheidt | www.falsemirror.com | [EMAIL PROTECTED] --- ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )