Search code examples
pythondjangogoogle-app-enginemiddlewaredjango-middleware

How to adding middleware to Appengine's webapp framework?


I'm using the appengine webapp framework (link). Is it possible to add Django middleware? I can't find any examples. I'm currently trying to get the FirePython middleware to work (link).


Solution

  • It's easy: You create the WSGI application as per normal, then wrap that application in your WSGI middleware before executing it.

    See this code from Bloog to see how firepython is added as middleware.