skillfed

django-browser-reload

Automatically refresh your browser on changes to Python code, templates, or static files.

django-browser-reload v1.21.0 665.6K downloads/30d#5,429 on PyPI670
Permissive license MIT Active released

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-reload

uv

uv add django-browser-reload

poetry

poetry add django-browser-reload

Installing 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

Development Status :: 5 - Production/StableFramework :: Django :: 4.2Framework :: Django :: 5.0Framework :: Django :: 5.1Framework :: Django :: 5.2Framework :: Django :: 6.0Intended Audience :: DevelopersNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTyping :: Typed

Tags

django auto reload browserlive reload django developmentdjango hot reloadbrowser refresh on file changedjango dev server auto refreshdjango template reloaddevelopment server live reload
django-developmentlive-reloaddev-tooling

More Software Development packages