Django Watchfiles

1.4.0 · active · verified Thu Apr 16

django-watchfiles is a Django package that enhances Django's built-in autoreloader by utilizing the more efficient `watchfiles` library. It provides faster and more reliable file change detection during development, leading to quicker server reloads. The current version is 1.4.0. It has an active but infrequent release cadence, typically releasing new versions as `watchfiles` or Django versions evolve.

Common errors

Warnings

Install

Imports

Quickstart

Install the package and add 'django_watchfiles' to your Django project's INSTALLED_APPS in `settings.py`. Ensure `DEBUG = True` for autoreloading to be active. Run `python manage.py runserver` as usual.

INSTALLED_APPS = [
    # ... other apps ...
    'django_watchfiles',
]

# Optional: Customize watch directory (default is project root)
# WATCHFILES_WATCH_DIR = '/path/to/your/custom/dir'

# Optional: Ignore specific patterns (default includes common ignores)
# WATCHFILES_IGNORE_PATTERNS = ['__pycache__/', '*.log']

view raw JSON →