谁能帮我出这个问题,我的JavaScript有一个Ajax GET HTTP请求:用ajax请求和Python的交互谷歌应用程序引擎
$.ajax({
url:"/testPage",
type:'GET',
success: function(){
alert("done");
}
});
服务器端Python应用程序有一个处理程序来处理HTTP请求从JS:
class testPageHandler(webapp.RequestHandler):
def get(self):
path=os.path.join(os.path.dirname(_file_).'page1.html')
template_values={}
self.response.out.write(template.render(path,template_values))
def post(self):
.....
application=webapp.WSGIApplication([('/testPage',testPageHandler),
.....
在“得到”的方法,我想Django模板“page1.html”被渲染,所以浏览器显示“page1.html”页面,而不是仅仅弹出“完成”。 有什么想法?提前致谢。
这是一个陈述,而不是一个问题。 – 2012-03-01 01:04:25
对不起,我正在编辑这个问题,你只是早一点。 – cnherald 2012-03-01 01:24:56
重复的http://stackoverflow.com/questions/3430877/how-do-i-redirect-a-page-jquery – 2012-03-01 01:28:43