Re: [Zope] Problems with lists
Pls keep your posts on the list... Regarding python scripts: the best place to start would be the Basic Scripting section of the Zope Book, which you can find here: http://www.plope.com/Books/2_7Edition/BasicScripting.stx For examples, have a look at the Python(Script) section of: http://zopelabs.com/ Jonathan - Original Message - From: [EMAIL PROTECTED] To: Jonathan Sent: Tuesday, September 05, 2006 2:23 PM Subject: Re: [Zope] Problems with lists Hi, I am sending this to you versus the list. Everyone says to use Python but I am the kind of guy who needs an example. But I am having a hard time finding the Zope/Python related examples. If you could point me in the right direction or one of your site that would be great. Thanks for the pointers, Larry -- Original message from "Jonathan" <[EMAIL PROTECTED]>: -- > > - Original Message - > From: [EMAIL PROTECTED] > To: zope@zope.org > Sent: Tuesday, September 05, 2006 1:30 PM > Subject: [Zope] Problems with lists > I use the the following dtml commands to populate the db. > > > > > > > > > > > > > > > > > > But these are the results: > > REQUEST > form > student_score1_temp ['2', '2', '2', '2', '2', '2', '2', '2'] > Submit 'Submit' > student_score2_temp ['3', '3', '3', '3', '3', '3', '3', '3'] > student_score3_temp ['3', '3', '3', '3', '3', '3', '3', '3'] > student_score4_temp ['4', '4', '4', '4', '4', '4', '4', '4'] > student_score5_temp ['5', '5', '5', '5', '5', '5', '5', '5'] > > > I can't figure out what your dtml prior to the loop is trying to accomplish, > however inside the loop your 'loop_counter' variable is a constant value (it > does not change, so you keep referring to the same list element). You need > something like: > > > > > The _['sequence-item'] will contain the current iteration result of your > _.range(counter) statement. > > Better yet, do this in a python script (way easier). > > > hth > > Jonathan > > > ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problems with lists
- Original Message - From: [EMAIL PROTECTED] To: zope@zope.org Sent: Tuesday, September 05, 2006 1:30 PM Subject: [Zope] Problems with lists I use the the following dtml commands to populate the db. student_score1_temp[loop_counter])"> student_score2_temp[loop_counter])"> student_score3_temp[loop_counter])"> student_score4_temp[loop_counter])"> student_score5_temp[loop_counter])"> But these are the results: REQUEST form student_score1_temp ['2', '2', '2', '2', '2', '2', '2', '2'] Submit 'Submit' student_score2_temp ['3', '3', '3', '3', '3', '3', '3', '3'] student_score3_temp ['3', '3', '3', '3', '3', '3', '3', '3'] student_score4_temp ['4', '4', '4', '4', '4', '4', '4', '4'] student_score5_temp ['5', '5', '5', '5', '5', '5', '5', '5'] I can't figure out what your dtml prior to the loop is trying to accomplish, however inside the loop your 'loop_counter' variable is a constant value (it does not change, so you keep referring to the same list element). You need something like: student_score1_temp[_['sequence-item']])"> The _['sequence-item'] will contain the current iteration result of your _.range(counter) statement. Better yet, do this in a python script (way easier). hth Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Problems with lists
Hi, I cleaned my glasses and saw that I fat fingered some keys. I am glad it was that easy to fix. Larry -- Original message from [EMAIL PROTECTED]: -- Hi, I am trying to create five list to collect student scores. As you can see I am using simple html to create them. 1) 0 1 2 3 4 5 6 2) 0 1 < ; ;OPT IO N VALUE="3">2 3 4 5 6 .. 5) 0 1 2 3 4 5 6 I use the the following dtml commands to populate the db. But these are the results: REQUESTformstudent_score1_temp ['2', '2', '2', '2', '2', '2', '2', '2'] Submit 'Submit' student_score2_temp ['3', '3', '3', '3', '3', '3', '3', '3'] student_score3_temp ['3', '3', '3', '3', '3', '3', '3', '3'] student_score4_temp ['4', '4', '4', '4', '4', '4', '4', '4'] student_score5_temp ['5', '5', '5', '5', '5', '5', '5', '5'] Any ideas where I am going wrong. Thanks, Larry McDonnell --- Begin Message --- ___ 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 ) --- End Message --- ___ 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 )