def unregister_admin_widget(widget_cls):
 widget_id = widget_cls.widget_id
 try:
  primary_widgets.remove(widget_cls)
 except ValueError:
  try:
   secondary_widgets.remove(widget_cls)
  except ValueError:
   logging.error(u'Failed to unregister unknown administration widget "%s".', widget_id)
   raise KeyError((u'"%s" is not a registered administration widget' % widget_id))

def unregister_admin_widget ( widget_cls ) : widget_id = widget_cls . widget_id try : primary_widgets . remove ( widget_cls ) except ValueError : try : secondary_widgets . remove ( widget_cls ) except ValueError : logging . error ( u'Failed to unregister unknown administration widget "%s".' , widget_id ) raise KeyError ( ( u'"%s" is not a registered administration widget' % widget_id ) )
unregister a previously registered administration widget .