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'
),