django-watchfiles 0.2.0

Creator: bradpython12

Last updated:

Add to Cart

Description:

djangowatchfiles 0.2.0

Use watchfiles in Django’s autoreloader.

Improve your Django and Git skills with my books.


Requirements
Python 3.8 to 3.12 supported.
Django 3.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.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.