#NEWLINE# def get_backend( config = None ) : #NEWLINE# #INDENT# global default_fileserving #NEWLINE# if ( default_fileserving and ( not config ) ) : #NEWLINE# #INDENT# return default_fileserving #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# config = ( config or 'UPLOAD' ) #NEWLINE# cls = settings . get_var ( ( '%s/BACKEND' % config ) ) #NEWLINE# if cls : #NEWLINE# #INDENT# fileserving = import_attr ( cls ) ( config = config ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# fileserving = FileServing ( config = config ) #NEWLINE# #UNINDENT# if ( config == 'UPLOAD' ) : #NEWLINE# #INDENT# default_fileserving = fileserving #NEWLINE# #UNINDENT# return fileserving