The point is that I can not give a response from the server to the client. It is necessary to return a dictionary with values, but how to do it? The code looks like this:
response_dict = {'success': True, 'info': 'some text', 'errors': 'some errors'} return HttpResponse(response_dict, mimetype = 'text/plain')
After the ajax request, it simply returns the string "successinfoerrors", i.e. string of dictionary keys. There is an assumption that mimetype is incorrectly specified. Can someone open the veil for me, how to return the necessary data from the view correctly?