#NEWLINE# def get_alias( self ) : #NEWLINE# #INDENT# "\n        Gets the alias for the field or the auto_alias if one is set.\n        If there isn't any kind of alias, None is returned.\n\n        :return: The field alias, auto_alias, or None\n        :rtype: str or None\n        " #NEWLINE# alias = None #NEWLINE# if self . alias : #NEWLINE# #INDENT# alias = self . alias #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if self . auto_alias : #NEWLINE# #INDENT# alias = self . auto_alias #NEWLINE# #UNINDENT# #UNINDENT# if ( self . table and field_prefix . table . prefix_fields ) : #NEWLINE# #INDENT# field_prefix = self . table . get_field_prefix ( ) #NEWLINE# if alias : #NEWLINE# #INDENT# alias = '{0}__{1}' . format ( field_prefix , alias ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# alias = '{0}__{1}' . format ( field_prefix , self . name ) #NEWLINE# #UNINDENT# #UNINDENT# return alias