#NEWLINE# def grid_image_formatter( view , value ) : #NEWLINE# #INDENT# if ( not value . grid_id ) : #NEWLINE# #INDENT# return '' #NEWLINE# #UNINDENT# return Markup ( ( ( ( '<div class="image-thumbnail">' + '<a href="%(url)s" target="_blank"><img src="%(thumb)s"/></a>' ) + '</div>' ) % { #NEWLINE# #INDENT# 'url' : view . get_url ( '.api_file_view' , ** helpers . make_gridfs_args ( value ) ) , #NEWLINE# 'thumb' : view . get_url ( '.api_file_view' , ** helpers . make_thumb_args ( value ) ) , #NEWLINE# #UNINDENT# } ) )