--- id: django-browser-reload version: "1.21.0" license: MIT license_treatment: permissive maintenance: active --- # django-browser-reload — Automatically refresh your browser on changes to Python code, templates, or static files. License: permissive · Maintenance: active · Downloads: 665.6K/mo ## 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 above — 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 pip install django-browser-reload uv add django-browser-reload 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_current - Install friction: low - Maintenance: active - Downloads: 665.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django auto reload browser, live reload django development, django hot reload, browser refresh on file change, django dev server auto refresh, django template reload, development server live reload, django-development, live-reload, dev-tooling [View on SkillFed](https://skillfed.io/packages/django-browser-reload) · [View on PyPI](https://pypi.org/project/django-browser-reload/)