#NEWLINE# def register_plugin( self , plugin_class , admin_view_class ) : #NEWLINE# #INDENT# from xadmin.views.base import BaseAdminPlugin #NEWLINE# if issubclass ( plugin_class , BaseAdminPlugin ) : #NEWLINE# #INDENT# self . _registry_plugins . setdefault ( admin_view_class , [ ] ) . append ( self ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ImproperlyConfigured ( ( "The registered plugin class %s isn't subclass of %s" % ( plugin_class . __name__ , BaseAdminPlugin . __name__ ) ) )