#NEWLINE# def label_for_value( self , value ) : #NEWLINE# #INDENT# values = [ ] #NEWLINE# key = self . rel . get_related_field ( ) . name #NEWLINE# for v in value . split ( ',' ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# obj = self . rel . to . _default_manager . using ( self . db ) . get ( ** { #NEWLINE# #INDENT# key : v , #NEWLINE# #UNINDENT# } ) #NEWLINE# values . append ( ( '%s - %s' % ( v , escape ( obj ) ) ) ) #NEWLINE# #UNINDENT# except self . rel . to . DoesNotExist : #NEWLINE# #INDENT# values . append ( '???' ) #NEWLINE# #UNINDENT# #UNINDENT# return ( '&nbsp;<strong>%s</strong>' % ',&nbsp;' . join ( values ) )