python - how to check if request is ajax in turbogears -
How am I going to check whether the request is an AJAX request in a controller method in the turboire? Also, is it possible to make a partial 'partial' return to the rail or symphony if the request is an AJAX request. I know about Jason Decorator but I want a partial way back to Mako template (because I have to format data And does not want to do it all in javascript). For example, if I want to return the formatted list for the page 2 of the news list, then I do not want to return the whole page (rather just the formatted list).
Thanks
jQuery, YUI, prototype, dodge and moto all header Set X-Requested-With: XMLHttpRequest
. You should be able to check that header.
Comments
Post a Comment