[Zope] Range Function of dtml-in tag

Andreas Jung andreas at andreas-jung.com
Wed Jan 7 12:16:38 EST 2004


provide a example how to reproduce this and *ensure* that the parameters
are of type *int*. don't try to pass a *string* as argument.

-aj

--On Mittwoch, 7. Januar 2004 12:04 Uhr -0500 Asad Habib 
<ahabib at engin.umich.edu> wrote:

> Hello. Thanks. I tried that and now I am getting a type error. Is there
> any way around this? Zope does not allow me to provide a variable for the
> EndValue of the range method for the dtml-in tag.
>
> - Asad
>
> On Wed, 7 Jan 2004, Dragos Chirila wrote:
>
>> Hi
>>
>> Python is case sensitive!!!
>>
>> It's
>>
>> <dtml-in "_.range(REQUEST.form['counter'])">
>>
>> not
>>
>> <dtml-in "_.range(Request.form['counter'])">
>>
>> dragos
>>
>> ----- Original Message -----
>> From: "Asad Habib" <ahabib at engin.umich.edu>
>> To: <zope at zope.org>
>> Sent: Wednesday, January 07, 2004 6:13 PM
>> Subject: [Zope] Range Function of dtml-in tag
>>
>>
>> > Hello. I have a variable that I pass as a hidden parameter from a dtml
>> > document to a dtml method(this variable is a counter and is passed to
>> > the dtml method when a form(the dtml document) is submiited). I would
>> > like to use the value of this variable as the Endvalue of the range
>> > method that is used with the dtml-in tag. I have tried both of the
>> > following but they don't work and give the error listed below:
>> >
>> > <dtml-in "_.range(Request.form['counter'])">
>> > <dtml-in "_.range(Request.get('counter'))">
>> >
>> > Error Type: NameError
>> > Error Value: global name 'Request' is not defined
>> >
>> >
>> > The variable is being passed correctly and I have confirmed this by
>> > using the following:
>> > <dtml-var "REQUEST.form['counter']">
>> >
>> > Any help would be greatly appreciated. Thanks.
>> >
>> > - Asad
>> >
>> >
>> > _______________________________________________
>> > Zope maillist  -  Zope at 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 at 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 at 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 )







More information about the Zope mailing list