Is there a way I can customize Django error reporting so when it emails me it lets me know which user triggered the error?
I'm in Django 1.2 if it matters.
Much Thanks in advance!
Is there a way I can customize Django error reporting so when it emails me it lets me know which user triggered the error?
I'm in Django 1.2 if it matters.
Much Thanks in advance!
If you don't want to use sentry you can use this simple middleware to attache the user-infos to the error mail:
You can simply put this class in a *.py file anywhere below your Django project and add a reference to
MIDDLEWARE_CLASSES
. I.e. if you put it in a file "middleware" in the project root (where your settings.py is) , you simply addmiddleware.ExceptionUserInfoMiddleware
.I highly recommend http://readthedocs.org/docs/sentry/en/latest/index.html for the job.