Created
February 18, 2011 15:02
-
-
Save gorakhargosh/833768 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tipfy import RequestHandler | |
from tipfyext.jinja2 import Jinja2Mixin | |
from tipfy.sessions import SessionMiddleware | |
class ChromeFrameMiddleware(object): | |
""" | |
Middleware that enables the Google Chrome frame plugin or IE edge | |
rendering engine. | |
""" | |
def after_dispatch(self, handler, response): | |
response.headers.add('X-UA-Compatible', 'IE=edge,chrome=1') | |
return response | |
class SessionRequestHandler(RequestHandler, Jinja2Mixin): | |
middleware = [ChromeFrameMiddleware(), SessionMiddleware()] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment