debugging - How can I include the request.User details in Django's traceback email for a production site -


i include contents of request.user in context details emailed site admins when error occurs, traceback , request.get/post/cookies/meta

any appreciated.

because process_exception middleware gets passed request object, can add whatever info request.meta

class errormiddleware(object):     """     alter httprequest objects on error     """      def process_exception(self, request, exception):         """         add user details.         """         request.meta['user'] = request.user.username 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -