@core_helper
def rendered_resource_view(resource_view, resource, package, embed=False):
 view_plugin = datapreview.get_view_plugin(resource_view['view_type'])
 context = {}
 data_dict = {'resource_view': resource_view, 'resource': resource, 'package': package}
 vars = (view_plugin.setup_template_variables(context, data_dict) or {})
 template = view_plugin.view_template(context, data_dict)
 data_dict.update(vars)
 if ((not resource_view_is_iframed(resource_view)) and embed):
  template = 'package/snippets/resource_view_embed.html'
 import ckan.lib.base as base
 return literal(base.render(template, extra_vars=data_dict))

@ core_helper def rendered_resource_view ( resource_view , resource , package , embed = False ) : view_plugin = datapreview . get_view_plugin ( resource_view [ 'view_type' ] ) context = { } data_dict = { 'resource_view' : resource_view , 'resource' : resource , 'package' : package } vars = ( view_plugin . setup_template_variables ( context , data_dict ) or { } ) template = view_plugin . view_template ( context , data_dict ) data_dict . update ( vars ) if ( ( not resource_view_is_iframed ( resource_view ) ) and embed ) : template = 'package/snippets/resource_view_embed.html' import ckan . lib . base as base return literal ( base . render ( template , extra_vars = data_dict ) )
returns a rendered resource view snippet .