#NEWLINE# @ login_required #NEWLINE# def ajax_job_poll( request , download_id , template = 'soil/partials/bootstrap2/dl_status.html' ) : #NEWLINE# #INDENT# message = ( request . GET [ 'message' ] if ( 'message' in request . GET ) else None ) #NEWLINE# is_bootstrap3 = ( request . GET . get ( 'is_bootstrap3' , 'false' ) == 'true' ) #NEWLINE# template = ( 'soil/partials/bootstrap3/dl_status.html' if is_bootstrap3 else download_id ) #NEWLINE# try : #NEWLINE# #INDENT# context = get_download_context ( download_id , check_state = True , message = message ) #NEWLINE# #UNINDENT# except TaskFailedError as e : #NEWLINE# #INDENT# context = { #NEWLINE# #INDENT# 'error' : ( list ( e . errors ) if e . errors else [ _ ( 'An error occurred during the download.' ) ] ) , #NEWLINE# #UNINDENT# } #NEWLINE# return HttpResponseServerError ( render ( request , template , context ) ) #NEWLINE# #UNINDENT# return render ( request , template , context )