[Product-Developers] urlencode the zope/plone way

Christian Ledermann christian.ledermann at gmail.com
Thu Apr 7 15:01:43 UTC 2011


Hello,

How can i encode the parameters:

{'Creator': '', 'portal_type': ['ContactDb', 'FormFolder'], 'sort_on':
'', 'SearchableText': '', 'created': [DateTime('1970/02/01')],
'review_state': ['pending', 'private', 'published', 'sent']}

in a zope/plone conform manner i.e to:

SearchableText=&portal_type%3Alist=ContactDb&portal_type%3Alist=FormFolder&created%3Alist%3Adate=1970%2F02%2F01&created_usage=range%3Amin&review_state%3Alist=pending&review_state%3Alist=private&review_state%3Alist=published&review_state%3Alist=sent&Creator=&sort_on=&b_size%3Aint=30&submit=Search

the python urlib.urlencode returns:

Creator=&portal_type=%5B%27ContactDb%27%2C+%27FormFolder%27%5D&sort_on=&SearchableText=&created=%5BDateTime%28%271970%2F02%2F01%27%29%5D&review_state=%5B%27pending%27%2C+%27private%27%2C+%27published%27%2C+%27sent%27%5D

which will not be correctly interpreted into the request.form



-- 
Best Regards,

Christian Ledermann

Nairobi - Kenya
Mobile : +254 729495789

<*)))>{

If you save the living environment, the biodiversity that we have left,
you will also automatically save the physical environment, too. But If
you only save the physical environment, you will ultimately lose both.

1) Don’t drive species to extinction

2) Don’t destroy a habitat that species rely on.

3) Don’t change the climate in ways that will result in the above.

}<(((*>



More information about the Product-Developers mailing list