@core_helper
def redirect_to(*args, **kw):
 if are_there_flash_messages():
  kw['__no_cache__'] = True
 uargs = map((lambda arg: (str(arg) if isinstance(arg, unicode) else arg)), args)
 _url = url_for(*uargs, **kw)
 if _url.startswith('/'):
  _url = str((config['ckan.site_url'].rstrip('/') + _url))
 if is_flask_request():
  return _flask_redirect(_url)
 else:
  return _routes_redirect_to(_url)

@ core_helper def redirect_to ( * args , ** kw ) : if are_there_flash_messages ( ) : kw [ '__no_cache__' ] = True uargs = map ( ( lambda arg : ( str ( arg ) if isinstance ( arg , unicode ) else arg ) ) , args ) _url = url_for ( * uargs , ** kw ) if _url . startswith ( '/' ) : _url = str ( ( config [ 'ckan.site_url' ] . rstrip ( '/' ) + _url ) ) if is_flask_request ( ) : return _flask_redirect ( _url ) else : return _routes_redirect_to ( _url )
convenience function mixing :func:redirect and :func:uri_for .