#NEWLINE# def get_view_class( self , view_class , option_class = None , **opts ) : #NEWLINE# #INDENT# merges = ( [ option_class ] if option_class else [ ] ) #NEWLINE# for klass in view_class . mro ( ) : #NEWLINE# #INDENT# reg_class = self . _registry_avs . get ( klass ) #NEWLINE# if reg_class : #NEWLINE# #INDENT# merges . append ( reg_class ) #NEWLINE# #UNINDENT# settings_class = self . _get_settings_class ( klass ) #NEWLINE# if settings_class : #NEWLINE# #INDENT# merges . append ( settings_class ) #NEWLINE# #UNINDENT# merges . append ( klass ) #NEWLINE# #UNINDENT# new_class_name = '' . join ( [ c . __name__ for c in merges ] ) #NEWLINE# if ( new_class_name not in self . _admin_view_cache ) : #NEWLINE# #INDENT# plugins = self . get_plugins ( view_class , option_class ) #NEWLINE# self . _admin_view_cache [ new_class_name ] = MergeAdminMetaclass ( new_class_name , tuple ( merges ) , dict ( { #NEWLINE# #INDENT# 'plugin_classes' : plugins , #NEWLINE# 'admin_site' : self , #NEWLINE# #UNINDENT# } , ** opts ) ) #NEWLINE# #UNINDENT# return self . _admin_view_cache [ new_class_name ]