original_docstring: Render this package's public activity stream page.
      
docstring: Render this package's public activity stream page.
docstring_tokens: Render this package ' s public activity stream page .
code: def activity(package_type, id):
      """Render this package's public activity stream page.
      """
      context = {
          u'model': model,
          u'session': model.Session,
          u'user': g.user,
          u'for_view': True,
          u'auth_user_obj': g.userobj
      }
      data_dict = {u'id': id}
      try:
          pkg_dict = get_action(u'package_show')(context, data_dict)
          pkg = context[u'package']
          package_activity_stream = get_action(
              u'package_activity_list_html')(
              context, {u'id': pkg_dict[u'id']})
          dataset_type = pkg_dict[u'type'] or u'dataset'
      except NotFound:
          return base.abort(404, _(u'Dataset not found'))
      except NotAuthorized:
          return base.abort(403, _(u'Unauthorized to read dataset %s') % id)
  
      # TODO: remove
      g.pkg_dict = pkg_dict
      g.pkg = pkg
      g.package_activity_stream = package_activity_stream
  
      return base.render(
          u'package/activity.html', {
              u'dataset_type': dataset_type,
              u'pkg_dict': pkg_dict,
              u'pkg': pkg,
              u'package_activity_stream': package_activity_stream
          }
      )
code_tokens: def activity ( package_type , id ) : context = { u'model' : model , u'session' : model . Session , u'user' : g . user , u'for_view' : True , u'auth_user_obj' : g . userobj } data_dict = { u'id' : id } try : pkg_dict = get_action ( u'package_show' ) ( context , data_dict ) pkg = context [ u'package' ] package_activity_stream = get_action ( u'package_activity_list_html' ) ( context , { u'id' : pkg_dict [ u'id' ] } ) dataset_type = pkg_dict [ u'type' ] or u'dataset' except NotFound : return base . abort ( 404 , _ ( u'Dataset not found' ) ) except NotAuthorized : return base . abort ( 403 , _ ( u'Unauthorized to read dataset %s' ) % id ) g . pkg_dict = pkg_dict g . pkg = pkg g . package_activity_stream = package_activity_stream return base . render ( u'package/activity.html' , { u'dataset_type' : dataset_type , u'pkg_dict' : pkg_dict , u'pkg' : pkg , u'package_activity_stream' : package_activity_stream } )
short_docstring: Render this package's public activity stream page.
short_docstring_tokens: Render this package ' s public activity stream page .
comment: """Render this package's public activity stream page.
      """$SEP$# TODO: remove