Stuff
public python v1 · immutabledef uploadfile(request): manipulator = HomeworkUpload.AddManipulator() if request.POST: # New upload if data was POSTed. new_data = request.POST.copy() new_data.update(request.FILES) errors = manipulator.get_validation_errors(new_data) if not errors: # No errors found. manipulator.do_html2python(new_data) hwkfile = manipulator.save(new_data) print("No errors") return HttpResponseRedirect("/hwk") else: print(errors) errors = new_data = {} return HttpResponse("File uploaded")