Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
bugsnag_demo
demo
.gitignore
README.md
db.sqlite3
index.html
manage.py
requirements.txt

README.md

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.

Setup

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!

  1. Clone the repo and cd into this directory:

    git clone https://github.com/bugsnag/bugsnag-python.git
    cd bugsnag-python/example/django
  2. Install dependencies

    pip install -r requirements.txt
  3. Before testing it, open up the settings.py file and configure your API key within the BUGSNAG dictionary.

  4. Confirm that Bugsnag middleware is added to the top of MIDDLEWARE in settings.py

    MIDDLEWARE = (
    'bugsnag.django.middleware.BugsnagMiddleware',
    ...
    )
  5. Run the application. (Make sure to use any 3+ version of python.)

    python manage.py runserver
  6. View the example page which will, by default, be served at: http://localhost:8000

For more information, see our Django documentation.