Use watchfiles in Django’s autoreloader.
Project description
Use watchfiles in Django’s autoreloader.
Requirements
Python 3.7 to 3.10 supported.
Django 2.2 to 4.0 supported.
Installation
Install with pip:
python -m pip install django-watchfilesAdd 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
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file makavafal-django-watchfiles-0.0.1.tar.gz.
File metadata
- Download URL: makavafal-django-watchfiles-0.0.1.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00d197ed04543bf2270f9ff8b50c433e03fe30d6282b81f14eeab27e1a1b5728
|
|
| MD5 |
697ef9442e66bf923b6998ac83db1f43
|
|
| BLAKE2b-256 |
6b848ab47ffd8c4bd0afe70745c5a2cb35f11bf1d776f417d7444e11f7b0e177
|
File details
Details for the file makavafal_django_watchfiles-0.0.1-py3-none-any.whl.
File metadata
- Download URL: makavafal_django_watchfiles-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3b399397faf2f50a7be986180d985a9b8e8395053f9d7297b8f77bd00c27a53
|
|
| MD5 |
e6fabb74d61cb79ec9eb3ae57d515553
|
|
| BLAKE2b-256 |
970cf88e942424d7a98eb594dbf11e28fbb7d31633888d9e3b38df7925e19d8d
|