Skip to content
Django middleware and userscript that displays debug tracebacks on production sites (where you would have DEBUG = False) only to developers.
Python JavaScript
Latest commit 7da6c71 Feb 16, 2014 @ionelmc Update setup.py.
Failed to load latest commit information.
docs
src/monkey_team Ooooops. Fix import. Mar 30, 2013
tests/test_project Add support for django trunk (1.6). Mar 7, 2013
.coveragerc
.gitignore Update proj/ignores. Jan 10, 2014
.travis.yml Update .travis.yml Jul 14, 2013
LICENSE Reformat/update years in license. Update manifests. Jan 9, 2014
MANIFEST.in Reformat/update years in license. Update manifests. Jan 9, 2014
README.rst Update readme. Feb 16, 2014
django-monkey-team.komodoproject Exclude dist and build from project. Nov 3, 2012
setup.py
tox.ini Update tox.ini Oct 27, 2013

README.rst

django-monkey-team

Build Status Coverage Status PYPI Package

This is a middleware that displays debug tracebacks on production sites (where you would have DEBUG = False) only to developers. Developers have to install a special userscript to decode the traceback data. AES-256 (CBC mode) is used to encrypt the traceback. The decode key and client key are hashes of your SECRET_KEY with salts so your SECRET_KEY is safe even if your userscript gets in the wrong place.

Google Chrome and Firefox are supported. If you want to use something else you have to find a way to install the userscript yourself.

There's also a decode page in the admin in case you get user reports with the encrypted data.

The error page and decrypt flow looks like this:

Sample error page

Installation guide

Install it:

pip install django-monkey-team

Change your Django project settings to have:

INSTALLED_APPS += (
    'monkey_team',
)
MIDDLEWARE_CLASSES += (
    'monkey_team.middleware.MonkeyTeamMiddleware',
)
DEBUG = False

Note, that if you want DEBUG = True and still have the middleware on you need to set:

MONKEY_FORCE_ACTIVE = True

Then go to django admin and install the userscript. The setup page looks like this:

Userscript install page

Requirements

OS:Any
Runtime:Python 2.6, 2.7
Packages:PyCrypto, Django>=1.3 (up to 1.6)
Something went wrong with that request. Please try again.