<s> from django . conf import settings <EOL> from django . core . files . storage import get_storage_class <EOL> from django . utils . importlib import import_module <EOL> import os <EOL> def import_from_path ( cls_path ) : <EOL> package , name = cls_path . rsplit ( '<STR_LIT:.>' , <NUM_LIT:1> ) <EOL> return getattr ( import_module ( package ) , name ) <EOL> DEFAULT_FILE_SIGNATURE = '<STR_LIT>' <EOL> FILE_SIGNATURE = getattr ( settings , <EOL> '<STR_LIT>' , <EOL> DEFAULT_FILE_SIGNATURE ) <EOL> THUMBNAIL_PROXY_BASE_URL = getattr ( settings , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> def thumbnail_proxy ( ) : <EOL> THUMBNAIL_PROXY = getattr ( settings , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> return import_from_path ( THUMBNAIL_PROXY ) <EOL> DEFAULT_REGEX = r'<STR_LIT>' % ( FILE_SIGNATURE % { <EOL> '<STR_LIT:source>' : r'<STR_LIT>' , <EOL> '<STR_LIT:size>' : r'<STR_LIT>' , <EOL> '<STR_LIT>' : r'<STR_LIT>' , <EOL> '<STR_LIT>' : r'<STR_LIT>' , <EOL> '<STR_LIT>' : r'<STR_LIT>' , <EOL> } ) <EOL> URL_REGEX = getattr ( settings , <EOL> '<STR_LIT>' , <EOL> DEFAULT_REGEX ) <EOL> LOCK_TIMEOUT = getattr ( settings , <EOL> '<STR_LIT>' , <EOL> <NUM_LIT:10> ) <EOL> KEY_PREFIX = getattr ( settings , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> def thumbnail_file ( ) : <EOL> THUMBNAIL_FILE = getattr ( settings , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> return import_from_path ( THUMBNAIL_FILE ) <EOL> def response_backend ( ) : <EOL> RESPONSE_BACKEND = getattr ( settings , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> return import_from_path ( RESPONSE_BACKEND ) <EOL> def source_storage_backend ( ) : <EOL> SOURCE_STORAGE_BACKEND = getattr ( settings , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> SOURCE_STORAGE_LOCATION = getattr ( settings , <EOL> '<STR_LIT>' , <EOL> settings . MEDIA_ROOT ) <EOL> return get_storage_class ( SOURCE_STORAGE_BACKEND ) ( <EOL> location = SOURCE_STORAGE_LOCATION ) <EOL> def storage_backend ( ) : <EOL> STORAGE_BACKEND = getattr ( settings , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> STORAGE_LOCATION = getattr ( settings , <EOL> '<STR_LIT>' , <EOL> os . path . join ( settings . MEDIA_ROOT , '<STR_LIT:..>' , '<STR_LIT>' ) ) <EOL> STORAGE_BASE_PATH = getattr ( settings , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> return get_storage_class ( STORAGE_BACKEND ) ( <EOL> location = STORAGE_LOCATION , <EOL> base_url = STORAGE_BASE_PATH ) </s>
