Use watchfiles in Django’s autoreloader.
Project description
Use watchfiles in Django’s autoreloader.
Improve your Django and Git skills with my books.
Requirements
Python 3.9 to 3.13 supported.
Django 4.2 to 5.1 supported.
Installation
Install with pip:
python -m pip install django-watchfiles
Add django-watchfiles to your INSTALLED_APPS:
INSTALLED_APPS = [ ..., "django_watchfiles", ..., ]
That’s it! 😅
Django doesn’t provide an official API for alternative autoreloader classes. Therefore, django-watchfiles monkey-patches django.utils.autoreload to make its own reloader the only available class. You can tell it is installed as runserver will list WatchfilesReloader as in use:
$ ./manage.py runserver
Watching for file changes with WatchfilesReloader
...
Unlike Django’s built-in WatchmanReloader, there is no need for a fallback to StatReloader, since watchfiles implements its own internal fallback to using stat.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django_watchfiles-1.0.0.tar.gz
.
File metadata
- Download URL: django_watchfiles-1.0.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4aa8e910bee610dae2b586771e587072fd984fad8a17e83940e707cfe2ca427 |
|
MD5 | b0e24e8acd1c51669569b6a95bed1164 |
|
BLAKE2b-256 | 0f997783138d516d0ffa9542e1bbbbe7efd30f1c6769745b51e93f9fe456f14e |
File details
Details for the file django_watchfiles-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: django_watchfiles-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eaee798f908864f2a0b73d0362867c7d3a284398eaca82a0583b43969a37178d |
|
MD5 | 6e634bc136c9a813b647f35281ed6e81 |
|
BLAKE2b-256 | 75cb5f478ed62be3b82a4adaaff51b209f9a72413d83449ca1baee9b8e718d59 |