#NEWLINE# def get_obj_field( self , obj ) : #NEWLINE# #INDENT# if ( self . obj_field is not None ) : #NEWLINE# #INDENT# return self . obj_field #NEWLINE# #UNINDENT# if isinstance ( obj , AbstractPageApp ) : #NEWLINE# #INDENT# return 'app' #NEWLINE# #UNINDENT# if isinstance ( obj , AbstractPlugin ) : #NEWLINE# #INDENT# return 'plugin' #NEWLINE# #UNINDENT# raise ImproperlyConfigured ( ( "'%s' must define an 'obj_field' attribute" % obj . __class__ . __name__ ) )