Bugsnag Django demo
This Django application demonstrates how to use Bugsnag with the Django web framework for Python.
Please note this particular example app will only work with Python 3+ and Django 2+, to showcase the most current configurations. Check out this example to see the configuration for Python 2 and Django 1.
Try this out with your own Bugsnag account! You'll be able to see how the errors are reported in the dashboard, how breadcrumbs are left, how errors are grouped and how they relate to the original source.
To get set up, follow the instructions below. Don't forget to replace the placeholder API token with your own!
Clone the repo and
cdinto this directory:
git clone https://github.com/bugsnag/bugsnag-python.git cd bugsnag-python/example/django
pip install -r requirements.txt
Before testing it, open up the
settings.pyfile and configure your API key within the
Confirm that Bugsnag middleware is added to the top of MIDDLEWARE in
MIDDLEWARE = ( 'bugsnag.django.middleware.BugsnagMiddleware', ... )
Run the application. (Make sure to use any 3+ version of python.)
python manage.py runserver
View the example page which will, by default, be served at: http://localhost:8000
For more information, see our Django documentation.