view examples/tutorial/geddit/lib/ajax.py @ 828:eb8aa8690480 experimental-inline

inline branch: template object can be compiled, and remembers the generated module.
author cmlenz
date Fri, 13 Mar 2009 16:06:42 +0000
parents 1837f39efd6f
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'
Copyright (C) 2012-2017 Edgewall Software