Re: passing multiple variables via the url string

Maciej Wisniowski <[email protected]> Sun, 02 Sep 2007 00:40:32 +0200
Newsgroups gmane.comp.web.zope.database
Message-ID <[email protected]>
> container.absolute_url()+'/my-documents/?field1='+field1&'field2='+field2
> 
> Executing the command returns the following error:
> 
>     "unsupported operand type(s) for &: 'str' and 'str'"
> 
> 
> The "&"symbol from all my research should separate the variables.  Does Zope
> use some other symbol?
No. Your code is wrong because you have '&' outside string:

container.absolute_url()+'/my-documents/?field1='+field1&'field2='+field2
                                                       ^^^^^

This should be:

container.absolute_url()+'/my-documents/?field1='+field1+'&field2='+field2


BTW. This list is for Zope and database issues.

-- 
Maciej Wisniowski