{ "html": "
If you haven’t already, start by downloading Raven. The easiest way is\nwith pip:
\npip install raven --upgrade\n
Using the Django integration is as simple as adding\nraven.contrib.django.raven_compat
to your installed apps:
INSTALLED_APPS = (\n 'raven.contrib.django.raven_compat',\n)\n
Note
\nThis causes Raven to install a hook in Django that will\nautomatically report uncaught exceptions.
\nAdditional settings for the client are configured using the\nRAVEN_CONFIG
dictionary:
import os\nimport raven\n\nRAVEN_CONFIG = {\n 'dsn': '___DSN___',\n # If you are using git, you can also automatically configure the\n # release based on the git info.\n 'release': raven.fetch_git_sha(os.path.abspath(os.pardir)),\n}\n
Once you’ve configured the client, you can test it using the standard Django\nmanagement interface:
\npython manage.py raven test\n
You’ll be referencing the client slightly differently in Django as well:
\nfrom raven.contrib.django.raven_compat.models import client\n\nclient.captureException()\n