ajax请求时,由django后台直接返回json数据
result = {"password": password, "encrypt": encrypt_str}
return HttpResponse(json.dumps(result), content_type="application/json")
angularjs可以直接使用以下方法取得值
$scope.password = response["password"]
$scope.encrypt = response["encrypt"]