#NEWLINE# def default( thumbnailer , prepared_options , source_filename , thumbnail_extension , **kwargs ) : #NEWLINE# #INDENT# "\n    Easy-thumbnails' default name processor.\n\n    For example: ``source.jpg.100x100_q80_crop_upscale.jpg``\n    " #NEWLINE# filename_parts = [ source_filename ] #NEWLINE# if ( ( '%(opts)s' in thumbnailer . thumbnail_basedir ) or ( '%(opts)s' in thumbnailer . thumbnail_subdir ) ) : #NEWLINE# #INDENT# if ( thumbnail_extension != os . path . splitext ( source_filename ) [ 1 ] [ 1 : ] ) : #NEWLINE# #INDENT# filename_parts . append ( thumbnail_extension ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# filename_parts += [ '_' . join ( prepared_options ) , thumbnail_extension ] #NEWLINE# #UNINDENT# return '.' . join ( filename_parts )