#NEWLINE# def render( self , name , value , attrs = None ) : #NEWLINE# #INDENT# output = super ( ImageClearableFileInput , self ) . render ( name , value , attrs ) #NEWLINE# if ( ( not value ) or ( not hasattr ( value , 'storage' ) ) ) : #NEWLINE# #INDENT# return output #NEWLINE# #UNINDENT# thumb = self . get_thumbnail ( value ) #NEWLINE# substitution = { #NEWLINE# #INDENT# 'template' : output , #NEWLINE# 'thumb' : thumb . tag ( id = self . thumbnail_id ( self ) ) , #NEWLINE# 'source_url' : value . storage . url ( value . name ) , #NEWLINE# #UNINDENT# } #NEWLINE# return mark_safe ( ( self . template_with_thumbnail % substitution ) )