Passing multiple values to cherrypy.url()

310 views
Skip to first unread message

Voltron

unread,
Oct 20, 2009, 5:43:00 PM10/20/09
to cherrypy-users
How does one pass multiple values to the "qs" variable in the
cherrypy.url function? I would like to have "foo=1" and "bar=2"

cherrypy.url("title", qs="foo=edit")

Thanks

Voltron

unread,
Oct 20, 2009, 5:44:18 PM10/20/09
to cherrypy-users
This works:

cherrypy.url("title", qs="foo=1t;bar=2")

Christopher Roach

unread,
Oct 20, 2009, 6:22:27 PM10/20/09
to cherryp...@googlegroups.com
Though you can use a semi-colon to separate the values in a
querystring, I think you'll find that the normal convention is to use
an ampersand (&) to separate arguments. So, I would probably use the
following:

cherrypy.url("title", qs="foo=1&bar=2")
--
Christopher Roach
http://christopherroach.com

Voltron

unread,
Oct 22, 2009, 5:41:33 AM10/22/09
to cherrypy-users
Thanks!

mirko cianfarani

unread,
Mar 5, 2013, 1:05:43 PM3/5/13
to cherryp...@googlegroups.com, nhy...@googlemail.com
With this cherrypy.url("title", qs="foo=edit")  that will have the url?
Reply all
Reply to author
Forward
0 new messages