rendered paste bodydef uploadfile(request): manipulator = HomeworkUpload.AddManipulator() if request.POST: # New upload if data was POSTed. new_data = request.POST.copy() new_data = request.FILES groupadd = request.POST['togroup'] errors = manipulator.get_validation_errors(new_data) if not errors: # No errors found. manipulator.do_html2python(new_data) manipulator.do_html2python(groupadd) hwkfile = manipulator.save(new_data) togroup = manipulator.save(groupadd) print("No errors") return HttpResponseRedirect("/hwk") else: print(errors) errors = new_data = {} return HttpResponse("File uploaded")