Mercurial > genshi > mirror
view examples/tutorial/geddit/lib/ajax.py @ 625:abad7c2ebe15 trunk
GenshiTutorial: implemented AJAX commenting.
author | cmlenz |
---|---|
date | Fri, 31 Aug 2007 17:01:00 +0000 |
parents | |
children |
line wrap: on
line source
import cherrypy def is_xhr(): requested_with = cherrypy.request.headers.get('X-Requested-With') return requested_with and requested_with.lower() == 'xmlhttprequest'