Skip to content
A Django project for Airbrake
Find file
Latest commit 08fdf3c @mmcdaris mmcdaris Merge pull request #7 from airbrake/docs/add-examples-to-readme
Add installation instructions and manual example



When I went to implement Airbrake in I found two projects that looked like they might do the trick: django-airbrake, which was forked from the dormant django-hoptoad and Pytoad which wasn't made for Django. In the end, I decided to use bits and pieces of the two as the older django-airbrake wasn't working with the newer API and Pytoad didn't have any Django sugar.

Install airbrake-django from github using pip

pip install git+

Configure airbrake in your

To configure airbrake you will need to add airbrake to your INSTALLED_APPS and create the AIRBRAKE dictionary.

Add airbrake to INSTALLED_APPS in your

    # ...

Create the AIRBRAKE dictionary in your for project:

# Airbrake settings
    'USE_SSL': True,
    'TIMEOUT': 5,
    'ENVIRONMENT': 'production',

Then just restart your server!

Manually sending errors to airbrake

This example illustrates sending an error to Airbrake in a try catch.

from django.http import HttpResponse
from airbrake.utils.client import Client

def hello_errors(request):
    except Exception as error:
        airbrake = Client()
        airbrake.notify(error, request)

    return HttpResponse("Hello Erorrs")
Something went wrong with that request. Please try again.