I use this code to send a request:
function checkuser() { $.ajax({ url: 'http://10.252.84.159/ajaxrecivelogin', //type: 'POST', data: "{'username': 'aa', 'password' : 'bb'}", context: this, dataType: 'json', success: function (data) { $("#resp").html("success"); }, error: function () { $("#resp").html("error"); } });}; And its worked But when i add type:POST part it cause error. I use this django code to response that request: def ajaxrecivelogin(request): import json response_data = {} response_data['status'] = '1' return HttpResponse(json.dumps(response_data), content_type="application/json") Is it about my django code? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b4e8cb0c-e6cc-4245-9837-4226f2e9fcb9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.