Hi all! I'm working on a pylons project and found a problem with webhelpers.paginate.Page._pagerlink. I'm using webhelpers-1.0 from Debian Lenny backports, webhelpers.paginate.__version__ says '0.3.7'. My routes.Mapper is configured with explicit=True. I want for urls like /admin/user/list/page2 (not like /admin/user/list?page=2), so I configured my routes:
map.connect('/{controller}/{action}/page{page}', requirements={'page': '\d{1,5}'}) And now pager generates invalid urls. This happens when pager._pagerlink updates link_params using config.mapper_dict and link_param['page'] overrides. The solution is simple: --- /usr/lib/pymodules/python2.5/webhelpers/paginate.py 2010-03-19 10:40:15.000000000 +0600 +++ /usr/lib/pymodules/python2.5/webhelpers/paginate.py.new 2010-07-01 19:33:10.000000000 +0700 @@ -724,7 +724,8 @@ if config.mapper.explicit: if hasattr(config, 'mapper_dict'): for k, v in config.mapper_dict.items(): - link_params[k] = v + if k != self.page_param: + link_params[k] = v # Create the URL to load a certain page link_url = url_for(**link_params) -- 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.