#NEWLINE# @ classmethod #NEWLINE# def run_action_from_console( self , pk = None , an = None ) : #NEWLINE# #INDENT# '\n        Not yet stable. Used by print_tx25.py.\n        To be combined with the `show` management command.\n        ' #NEWLINE# settings . SITE . startup ( ) #NEWLINE# if ( pk is not None ) : #NEWLINE# #INDENT# if ( an is None ) : #NEWLINE# #INDENT# an = self . default_elem_action_name #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( an is None ) : #NEWLINE# #INDENT# an = self . default_list_action_name #NEWLINE# #UNINDENT# #UNINDENT# ba = self . get_action_by_name ( an ) #NEWLINE# if ( pk is None ) : #NEWLINE# #INDENT# ar = self . request ( action = ba ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ar = self . request ( action = ba , selected_pks = [ pk ] ) #NEWLINE# #UNINDENT# ba . action . run_from_ui ( ar ) #NEWLINE# kw = ar . response #NEWLINE# msg = kw . get ( 'message' ) #NEWLINE# if msg : #NEWLINE# #INDENT# print ( msg ) #NEWLINE# #UNINDENT# url = ( kw . get ( 'open_url' ) or kw . get ( 'open_davlink_url' ) ) #NEWLINE# if url : #NEWLINE# #INDENT# os . startfile ( url )