<s> from django . conf import settings <EOL> from django . utils . importlib import import_module <EOL> from restthumbnails import helpers <EOL> class ThumbnailBase ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , source , size , method , extension , ** kwargs ) : <EOL> from restthumbnails import defaults <EOL> self . source = getattr ( source , '<STR_LIT:name>' , source ) <EOL> self . file_signature = defaults . FILE_SIGNATURE <EOL> self . size = helpers . parse_size ( size ) <EOL> self . method = helpers . parse_method ( method ) <EOL> self . extension = extension <EOL> @ property <EOL> def size_string ( self ) : <EOL> return u'<STR_LIT:x>' . join ( map ( str , self . size ) ) <EOL> @ property <EOL> def secret ( self ) : <EOL> return helpers . get_secret ( <EOL> self . source , self . size_string , self . method , self . extension ) <EOL> @ property <EOL> def key ( self ) : <EOL> return helpers . get_key ( <EOL> self . source , self . size_string , self . method , self . extension ) </s>
