#NEWLINE# @ classmethod #NEWLINE# def get_data_elem( self , name ) : #NEWLINE# #INDENT# 'Find data element in this actor by name.\n\n        ' #NEWLINE# c = self . _constants . get ( name , None ) #NEWLINE# if ( c is not None ) : #NEWLINE# #INDENT# return c #NEWLINE# #UNINDENT# vf = self . virtual_fields . get ( name , None ) #NEWLINE# if ( vf is not None ) : #NEWLINE# #INDENT# return vf #NEWLINE# #UNINDENT# a = getattr ( self , name , None ) #NEWLINE# if isinstance ( a , actions . Action ) : #NEWLINE# #INDENT# return a #NEWLINE# #UNINDENT# if isinstance ( a , fields . DummyField ) : #NEWLINE# #INDENT# return a #NEWLINE# #UNINDENT# s = name . split ( '.' ) #NEWLINE# if ( len ( s ) == 1 ) : #NEWLINE# #INDENT# m = settings . SITE . modules [ self . app_label ] #NEWLINE# if ( m is None ) : #NEWLINE# #INDENT# raise Exception ( ( 'No module %s' % self . app_label ) ) #NEWLINE# return None #NEWLINE# #UNINDENT# rpt = getattr ( m , name , None ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( len ( s ) == 2 ) : #NEWLINE# #INDENT# m = settings . SITE . modules . get ( s [ 0 ] , None ) #NEWLINE# if ( m is None ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# rpt = getattr ( m , s [ 1 ] , None ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise Exception ( ( 'Invalid data element name %r' % name ) ) #NEWLINE# #UNINDENT# #UNINDENT# return rpt