original_docstring: This redirects the user to the CKAN package/read page,
      unless there is request parameter giving an alternate location,
      perhaps an external website.
      @param pkg_name - Name of the package just edited
      @param action - What the action of the edit was
      
docstring: This redirects the user to the CKAN package/read page,
  unless there is request parameter giving an alternate location,
  perhaps an external website.
  @param pkg_name - Name of the package just edited
  @param action - What the action of the edit was
docstring_tokens: This redirects the user to the CKAN package / read page unless there is request parameter giving an alternate location perhaps an external website . @param pkg_name - Name of the package just edited @param action - What the action of the edit was
code: def _form_save_redirect(pkg_name, action, package_type=None):
      """This redirects the user to the CKAN package/read page,
      unless there is request parameter giving an alternate location,
      perhaps an external website.
      @param pkg_name - Name of the package just edited
      @param action - What the action of the edit was
      """
      assert action in (u'new', u'edit')
      url = request.args.get(u'return_to') or config.get(
          u'package_%s_return_url' % action
      )
      if url:
          url = url.replace(u'<NAME>', pkg_name)
      else:
          if package_type is None or package_type == u'dataset':
              url = h.url_for(u'dataset.read', id=pkg_name)
          else:
              url = h.url_for(u'{0}_read'.format(package_type), id=pkg_name)
      return h.redirect_to(url)
code_tokens: def _form_save_redirect ( pkg_name , action , package_type = None ) : assert action in ( u'new' , u'edit' ) url = request . args . get ( u'return_to' ) or config . get ( u'package_%s_return_url' % action ) if url : url = url . replace ( u'<NAME>' , pkg_name ) else : if package_type is None or package_type == u'dataset' : url = h . url_for ( u'dataset.read' , id = pkg_name ) else : url = h . url_for ( u'{0}_read' . format ( package_type ) , id = pkg_name ) return h . redirect_to ( url )
short_docstring: This redirects the user to the CKAN package/read page,
  unless there is request parameter giving an alternate location,
  perhaps an external website.
short_docstring_tokens: This redirects the user to the CKAN package / read page unless there is request parameter giving an alternate location perhaps an external website .
comment: """This redirects the user to the CKAN package/read page,
      unless there is request parameter giving an alternate location,
      perhaps an external website.
      @param pkg_name - Name of the package just edited
      @param action - What the action of the edit was
      """