Skip to content

Instantly share code, notes, and snippets.

@claudep
Created February 20, 2015 09:33
Show Gist options
  • Save claudep/2b61e59ac1bcc77ea2d5 to your computer and use it in GitHub Desktop.
Save claudep/2b61e59ac1bcc77ea2d5 to your computer and use it in GitHub Desktop.
class BDNMiddleware(object):
def process_exception(self, request, exception):
"""include authenticated user email in request.META"""
if request.user.is_authenticated():
request.META['USER_EMAIL'] = request.user.email
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment