#NEWLINE# def get_actions( self , request ) : #NEWLINE# #INDENT# '\n        Return a dictionary mapping the names of all actions for this\n        ModelAdmin to a tuple of (callable, name, description) for each action.\n        ' #NEWLINE# from django.contrib.admin.views.main import _is_changelist_popup #NEWLINE# if ( ( self . actions is None ) or _is_changelist_popup ( request ) ) : #NEWLINE# #INDENT# return SortedDict ( ) #NEWLINE# #UNINDENT# actions = [ ] #NEWLINE# for ( name , func ) in self . admin_site . actions : #NEWLINE# #INDENT# description = getattr ( func , 'short_description' , name . replace ( '_' , ' ' ) ) #NEWLINE# actions . append ( ( func , name , description ) ) #NEWLINE# #UNINDENT# for klass in self . __class__ . mro ( ) [ : : ( - 1 ) ] : #NEWLINE# #INDENT# class_actions = getattr ( klass , 'actions' , [ ] ) #NEWLINE# if ( not class_actions ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# actions . extend ( [ self . get_action ( action ) for action in class_actions ] ) #NEWLINE# #UNINDENT# actions = filter ( None , actions ) #NEWLINE# actions = SortedDict ( [ ( name , ( func , name , desc ) ) for ( func , name , desc ) in actions ] ) #NEWLINE# return actions