def plugin_report():
 plugin_report = []
 all_plugins = CMSPlugin.objects.order_by(u'plugin_type')
 plugin_types = list(set(all_plugins.values_list(u'plugin_type', flat=True)))
 plugin_types.sort()
 for plugin_type in plugin_types:
  plugin = {}
  plugin[u'type'] = plugin_type
  try:
   plugins = CMSPlugin.objects.filter(plugin_type=plugin_type)
   plugin[u'instances'] = plugins
   plugin[u'model'] = plugin_pool.get_plugin(name=plugin_type).model
   unsaved_instances = [p for p in plugins if (not p.get_plugin_instance()[0])]
   plugin[u'unsaved_instances'] = unsaved_instances
  except KeyError:
   plugin[u'model'] = None
   plugin[u'instances'] = plugins
   plugin[u'unsaved_instances'] = []
  plugin_report.append(plugin)
 return plugin_report

def plugin_report ( ) : plugin_report = [ ] all_plugins = CMSPlugin . objects . order_by ( u'plugin_type' ) plugin_types = list ( set ( all_plugins . values_list ( u'plugin_type' , flat = True ) ) ) plugin_types . sort ( ) for plugin_type in plugin_types : plugin = { } plugin [ u'type' ] = plugin_type try : plugins = CMSPlugin . objects . filter ( plugin_type = plugin_type ) plugin [ u'instances' ] = plugins plugin [ u'model' ] = plugin_pool . get_plugin ( name = plugin_type ) . model unsaved_instances = [ p for p in plugins if ( not p . get_plugin_instance ( ) [ 0 ] ) ] plugin [ u'unsaved_instances' ] = unsaved_instances except KeyError : plugin [ u'model' ] = None plugin [ u'instances' ] = plugins plugin [ u'unsaved_instances' ] = [ ] plugin_report . append ( plugin ) return plugin_report
returns a report of existing plugins structure of report: type: cmsplugin class .