req.route_url('main', action='pony', _query={'horn':'1'})

- C

On Tue, 2010-12-28 at 12:04 -0800, Mike Orr wrote:
> request.route_url() doesn't convert extra args to query params. Is
> this intentional? If so, it's another difference from pylons.url().
> 
> $ paster pshell development.ini Zzz
> Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
> [GCC 4.4.5] on linux2
> Type "help" for more information. "root" is the Pyramid app root object.
> >>> req = pyramid.threadlocal.get_current_request()
> >>> req.route_url("main", action="pony")
> 'http://localhost/pony'
> >>> req.route_url("main", action="pony", horn=1)
> 'http://localhost/pony'
> >>> req.route_url("main", action="pony", horn="1")
> 'http://localhost/pony'
> 
> -- 
> Mike Orr <sluggos...@gmail.com>
> 


-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to pylons-de...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en.

Reply via email to