#NEWLINE# def render( self , name , value , attrs = None ) : #NEWLINE# #INDENT# output = super ( LFSImageInput , self ) . render ( name , None , attrs = attrs ) #NEWLINE# if ( value and hasattr ( value , 'url_60x60' ) ) : #NEWLINE# #INDENT# output += ( '<div><img src="%s" /></div>' % value . url_60x60 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( value and hasattr ( value , 'url' ) ) : #NEWLINE# #INDENT# output += ( '<div><img src="%s" /></div>' % output . url ) #NEWLINE# #UNINDENT# #UNINDENT# if value : #NEWLINE# #INDENT# trans = _ ( 'Delete image' ) #NEWLINE# output += ( '<div><input type="checkbox" name="delete_image" id="id_delete_image" /> <label for="delete_image">%s</label></div>' % unicode ( trans ) ) #NEWLINE# #UNINDENT# return mark_safe ( output )