#NEWLINE# @ login_required ( ) #NEWLINE# def delete_course_modal( request ) : #NEWLINE# #INDENT# course = None #NEWLINE# if request . is_ajax ( ) : #NEWLINE# #INDENT# if ( request . method == 'POST' ) : #NEWLINE# #INDENT# course_id = int ( request . POST [ 'course_id' ] ) #NEWLINE# try : #NEWLINE# #INDENT# course = Course . objects . get ( id = course_id ) #NEWLINE# #UNINDENT# except Course . DoesNotExist : #NEWLINE# #INDENT# course = None #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return render ( request , 'registrar/teaching/delete_course_modal.html' , { #NEWLINE# #INDENT# 'course' : course , #NEWLINE# #UNINDENT# } )