django-browser-reload
Automatically refresh your browser on changes to Python code, templates, or static files.
What it is and what it does
django-browser-reload is a Django middleware and template tag that injects a listener script into your HTML pages during development. When you save changes to Python code, templates, or static files, the script receives a server-sent event and automatically reloads the most recently active browser tab, eliminating the need for manual refresh.
The package works by establishing a persistent EventSource connection from a SharedWorker in your browser to a Django view. When Django's autoreload system detects file changes or the server restarts, the view sends events that trigger a reload. It supports both WSGI and ASGI, works with Django's Content Security Policy middleware on version 6.0+, and can be deployed via middleware for automatic injection or via template tags for selective page control.
Use it for:
- Accelerate frontend development iteration by seeing CSS, JavaScript, and template changes instantly without manual browser refresh.
- Debug template rendering issues faster by watching changes propagate to the browser in real time.
- Test responsive design across multiple browser tabs while editing, with only the most recently used tab reloading to avoid disruption.
- Integrate into a Django admin customization workflow to see admin template changes reflected immediately.
- Combine with django-watchfiles for even faster file detection and reloading during active development.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Automatically reloads your browser when you modify Python code, templates, or static files during Django development, eliminating manual refresh cycles.
Yes. This is a low-friction development tool with no security vulnerabilities, active maintenance, permissive licensing, and minimal dependencies. It directly addresses a common Django developer pain point—manual browser refresh during iteration—and is mature enough for production-grade development workflows. Install it in any Django 4.2+ project running on Python 3.9+ where you want faster feedback loops during local development.
Install
django-browser-reload on PyPI
pip
pip install django-browser-reloaduv
uv add django-browser-reloadpoetry
poetry add django-browser-reloadInstalling django-browser-reload
Before you install
Low friction install with only asgiref and django as runtime dependencies. Actively maintained with recent commits and a stable release history since 2021.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects.
Quickstart
pip install django-browser-reload
# In settings.py
INSTALLED_APPS = [
"django.contrib.staticfiles",
"django_browser_reload",
]
MIDDLEWARE = [
"django_browser_reload.middleware.BrowserReloadMiddleware",
]
# In urls.py
urlpatterns = [
path("__reload__/", include("django_browser_reload.urls")),
]
# Run with DEBUG=True
python manage.py runserver
Requires DEBUG=True to function. Browser must support EventSource and SharedWorker (available on Chrome, Edge, Firefox, Opera, and Safari 16+). runserver must not use the --nothreading option.
Verify before relying
- Whether performance impact is negligible when many tabs are open simultaneously.
- Compatibility with custom WSGI/ASGI servers beyond Django's built-in runserver.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — asgiref, django |
| Maintenance | actively maintained — 326 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 665,589/month — #5,429 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_browser_reload-1.21.0-py3-none-any.whl
Keywords: Django
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
livereloadAutomatically reloads webpages in your browser…
permissive · top 15,000 on PyPI
django-watchfilesReplaces Django's default file-change watcher…
permissive · top 15,000 on PyPI
django-sslserverProvides an SSL-enabled development server for…
permissive · top 15,000 on PyPI
django-maintenance-modeActivates a 503 maintenance page in Django…
permissive · top 15,000 on PyPI
django-currentuserStores a reference to the currently logged-in…
permissive · top 15,000 on PyPI
django-upgradeAutomatically modernizes Django project code by…
permissive · top 15,000 on PyPI
DjangoDjango is a high-level Python web framework for…
permissive · top 1,000 on PyPI
django-cspDjango-CSP adds Content-Security-Policy headers…
permissive · top 5,000 on PyPI
django-js-reverseExposes Django named URLs to JavaScript,…
permissive · top 15,000 on PyPI
django-tailwindIntegrates Tailwind CSS into Django projects…
permissive · top 15,000 on PyPI