# Pagerless for Django

> Add the app and put the middleware first. Request rate, errors and latency per URL pattern, and every 500.

URL: https://pagerless.dev/integrations/django
Updated: 2026-10-22

## Set up

```bash
pip install pagerless
export PAGERLESS_KEY=pl_live_...
```

```python
INSTALLED_APPS = [..., "pagerless.django"]
MIDDLEWARE = ["pagerless.django.PagerlessMiddleware", ...]
```

Options can also live in `settings.PAGERLESS` (a dict). Django on ASGI works with the [ASGI middleware](https://pagerless.dev/integrations/fastapi) too.

## What it catches

- 500s, with the exception.
- Request rate, errors and latency per URL pattern.
- Uncaught exceptions anywhere in the process.

## Questions

### Why first in MIDDLEWARE?

So it times and sees every request, including ones other middleware turns into errors.
