Mercurial > genshi > mirror
view examples/tutorial/geddit/lib/ajax.py @ 893:b8bf0a7c0655 trunk
i18n: Another unit test related to #380.
author | cmlenz |
---|---|
date | Wed, 21 Apr 2010 10:58:49 +0000 |
parents | abad7c2ebe15 |
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'