diff options
author | adityacp | 2021-03-01 11:13:07 +0530 |
---|---|---|
committer | adityacp | 2021-03-01 11:13:07 +0530 |
commit | 542433598aad0efffee7619e1f113425147bcec0 (patch) | |
tree | be5cb438c81f76ad8d9e593b9e33033f0183c9ab /yaksh/views.py | |
parent | b2bf7b9fef33d59cd1e55776a51577d66a252322 (diff) | |
download | online_test-542433598aad0efffee7619e1f113425147bcec0.tar.gz online_test-542433598aad0efffee7619e1f113425147bcec0.tar.bz2 online_test-542433598aad0efffee7619e1f113425147bcec0.zip |
Add AWS support for file upload
Diffstat (limited to 'yaksh/views.py')
-rw-r--r-- | yaksh/views.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index 1965191..8422110 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -858,15 +858,15 @@ def check(request, q_id, attempt_num=None, questionpaper_id=None, ) for fname in assignment_filename: fname._name = fname._name.replace(" ", "_") - assignment_files = AssignmentUpload.objects.filter( - assignmentQuestion=current_question, course_id=course_id, - assignmentFile__icontains=fname, user=user, - question_paper=questionpaper_id) - if assignment_files.exists(): - assign_file = assignment_files.first() - if os.path.exists(assign_file.assignmentFile.path): - os.remove(assign_file.assignmentFile.path) - assign_file.delete() + # assignment_files = AssignmentUpload.objects.filter( + # assignmentQuestion=current_question, course_id=course_id, + # assignmentFile__icontains=fname, user=user, + # question_paper=questionpaper_id) + # if assignment_files.exists(): + # assign_file = assignment_files.first() + # if os.path.exists(assign_file.assignmentFile.path): + # os.remove(assign_file.assignmentFile.path) + # assign_file.delete() AssignmentUpload.objects.create( user=user, assignmentQuestion=current_question, course_id=course_id, |