Skip to content

Instantly share code, notes, and snippets.

@omaraboumrad
Created December 20, 2012 08:23
Show Gist options
  • Save omaraboumrad/4343776 to your computer and use it in GitHub Desktop.
Save omaraboumrad/4343776 to your computer and use it in GitHub Desktop.
Django middleware
class FooMiddleware(object):
def process_request(self, request):
pass
# in settings.py
MIDDLEWARE_CLASSES = (
# ...
'myapp.foo.middleware.FooMiddleware',
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment