def _map_redirects(mapper):
 def forward_qs(environ, result):
  qs_dict = parse_qs(environ['QUERY_STRING'])
  for qs in qs_dict:
   result[qs] = qs_dict[qs]
  return True
 mapper.redirect('/repository/status_for_installed_repository', '/api/repositories/updates/', _redirect_code='301 Moved Permanently', conditions=dict(function=forward_qs))
 return mapper

def _map_redirects ( mapper ) : def forward_qs ( environ , result ) : qs_dict = parse_qs ( environ [ 'QUERY_STRING' ] ) for qs in qs_dict : result [ qs ] = qs_dict [ qs ] return True mapper . redirect ( '/repository/status_for_installed_repository' , '/api/repositories/updates/' , _redirect_code = '301 Moved Permanently' , conditions = dict ( function = forward_qs ) ) return mapper
add redirect to the routes mapper and forward the received query string .