/django-autoreloader

Autoreload files in browser for Django development

Primary LanguagePythonMIT LicenseMIT

Django Autoreloader

Autoreload files in browser for Django developement with Linux

Requirement

Install and run django-instant for the websockets

Install

pip install django-autoreloader  

Add to settings:

INSTANT_SUPERUSER_CHANNELS = [
    ["$autoreload"]
]

Option

Add your watch list in settings.py:

# if not set the default is ["templates"]
ARWL = ["static/js", "static/css", "templates"]

# prevent paths from reloading: default is ["admin"]
ARX = ["admin", "do/not/reload"]

Run

Run the Django dev server and launch the watcher in another terminal:

python3 manage.py autoreload

Credits