We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to import 10Mb CSV file but getting no response. But able to import with 500 records
About CSV file Total no of records= 157797 No of columns = 8
Updated the settings.py as below
FILE_UPLOAD_MAX_MEMORY_SIZE = 15728640 DATA_UPLOAD_MAX_MEMORY_SIZE = 15728640
And the view defined as
class ImportParts(APIView): def post(self, request): if request.method == "POST": form = UploadFileForm(request.POST, request.FILES) def choice_func(row): q = Parts.objects.filter(cno=row[1], sNo=row[2]) if q: dictionary = dict(zip(model_dict, row)) q.update(**dictionary) row = [] return row if form.is_valid(): request.FILES['file'].save_to_database( model=Parts, initializer=choice_func, mapdict=( model_dict ) ) return JsonResponse({"success": True}, status=status.HTTP_201_CREATED) else: return HttpResponseBadRequest() return HttpResponseBadRequest()`
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Trying to import 10Mb CSV file but getting no response.
But able to import with 500 records
About CSV file
Total no of records= 157797
No of columns = 8
Updated the settings.py as below
And the view defined as
The text was updated successfully, but these errors were encountered: