view examples/tutorial/geddit/lib/ajax.py @ 698:654e1d1b3953

Fix for prefix-dispatched template loading. Closes #206. Thanks to Waldemar Kornewald for the patch.
author cmlenz
date Thu, 27 Mar 2008 14:45:11 +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'
Copyright (C) 2012-2017 Edgewall Software