Django in Ajax request send empty response if i not used request.POST -


on local server work normal. on production not work.

if send response way:

@csrf_exempt def ajax_get_delete_modal(request):     data = {         'status': 'success',         'data': 'test')     }  data = json.dumps(data) return httpresponse(data, 'application/json') 

i empty response.

but if send response way:

@csrf_exempt def ajax_get_delete_modal(request):     print request.post     data = {         'status': 'success',         'data': 'test')     }  data = json.dumps(data) return httpresponse(data, 'application/json') 

i normal response.

why happening? production server running on ngix-uwsgi.


Comments

Popular posts from this blog

javascript - IndexedDB error: Uncaught DataCloneError: Failed to execute 'put' on 'IDBObjectStore': An object could not be cloned -

java - Unable to make sub reports with Jasper -

Integrity error when loading fixtures for Selenium testing in Django -