Mercurial > genshi > genshi-test
view examples/tutorial/geddit/lib/ajax.py @ 938:a5a1c9a11135 tip
update tags
author | convert-repo |
---|---|
date | Tue, 31 May 2011 20:05:15 +0000 |
parents | dba522b4c31d |
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'