#NEWLINE# def get_line( self , entry ) : #NEWLINE# #INDENT# data = entry . portfolio_data #NEWLINE# return ( self . format % { #NEWLINE# #INDENT# 'id' : entry . portfolio_id , #NEWLINE# 'title' : entry . portfolio_title , #NEWLINE# 'curr' : data . currency_code , #NEWLINE# 'gain' : ( data . gain and data . gain . money [ 0 ] . amount ) , #NEWLINE# 'gain_persent' : ( '%-14.2f' % ( ( float ( data . gain_percentage ) * 100 ) , ) ) , #NEWLINE# 'cost_basis' : ( data . cost_basis and self . cost_basis . money [ 0 ] . amount ) , #NEWLINE# 'days_gain' : ( data . days_gain and data . days_gain . money [ 0 ] . amount ) , #NEWLINE# 'market_value' : ( data . market_value and data . market_value . money [ 0 ] . amount ) , #NEWLINE# #UNINDENT# } )