#NEWLINE# def contents( self ) : #NEWLINE# #INDENT# from django.contrib.admin.templatetags.admin_list import _boolean_icon #NEWLINE# from django.contrib.admin.views.main import EMPTY_CHANGELIST_VALUE #NEWLINE# ( field , obj , model_admin ) = ( self . field [ 'field' ] , self . form . instance , self . model_admin ) #NEWLINE# try : #NEWLINE# #INDENT# ( f , attr , value ) = lookup_field ( field , obj , model_admin ) #NEWLINE# #UNINDENT# except ( AttributeError , ValueError , ObjectDoesNotExist ) : #NEWLINE# #INDENT# result_repr = EMPTY_CHANGELIST_VALUE #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( f is None ) : #NEWLINE# #INDENT# boolean = getattr ( attr , 'boolean' , False ) #NEWLINE# if boolean : #NEWLINE# #INDENT# result_repr = _boolean_icon ( value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# result_repr = smart_text ( value ) #NEWLINE# if getattr ( attr , 'allow_tags' , False ) : #NEWLINE# #INDENT# result_repr = mark_safe ( result_repr ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( value is None ) : #NEWLINE# #INDENT# result_repr = EMPTY_CHANGELIST_VALUE #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# result_repr = display_for_field ( value , f ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return conditional_escape ( result_repr )