阅读背景:

如何检查请求是否是turbogears中的ajax

来源:互联网 

How do I go about checking if a request is an ajax request in a controller method in Turbogears? Further, is it possible to return a 'partial' much like in rails or symfony if the request is an ajax request. I know about the json decorator but I need a way to return a partial of a mako template (because I need to format the data and don't want to to do it all in Javascript). For example if I want to return the formatted list for page two of a list of news stories, I do not want to return the entire page (but rather just the formatted list).How do I go about checking if a request is an a




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: