ajax 在linux下 500错误代码,无法加载资源:服务器的响应状态为500(内部服务器错误)Djang...

I'm running Html file from S3 bucket in that HTML file there is AJAX call when I run/open the HTML file I am getting below error.

加载资源失败:服务器响应状态为500(内部服务器错误)

我的代码来自s3 bucket JS文件

$(document).ready(function () {

$.get("https://52.221.186.121/email_view/6/", function (data) {

console.log(JSON.stringify(data));

email_otp = JSON.stringify(data);

$("#btnSubmit").click(function () {

var input_value = $('#entered_otp').val();

alert(input_value);

alert(email_otp);

if (email_otp == input_value) {

alert('matches');

$('.modal').removeClass('show');

}

else {

alert('not matching');

window.location = "https://awslocation.com/mobile/index.html";

}

});

});

});

Corresponding views.py code

^{pr2}$

塔克巴克27.6.180.134 - - [12/Jun/2017:17:24:40 +0000] "GET /email_view/6/ HTTP/1.1" 500 38 "url_from_html_page_in_s3_bucket" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"

27.6.180.134 - - [12/Jun/2017:17:53:59 +0000] "GET /email_view/6/ HTTP/1.1" 500 38 "url_from_html_page_in_s3_bucket" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"

在网址.py在url(r'^email_view/(?P[-\w]+)/$', 'admin.views.course_ware.email_view',

name='email_view'

),

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值