https://github.com/synw/django-autoreloader
Autoreload files in browser for Django development
https://github.com/synw/django-autoreloader
Last synced: about 2 months ago
JSON representation
Autoreload files in browser for Django development
- Host: GitHub
- URL: https://github.com/synw/django-autoreloader
- Owner: synw
- License: mit
- Created: 2017-08-12T13:05:27.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-03T07:21:15.000Z (almost 7 years ago)
- Last Synced: 2025-03-28T07:34:01.601Z (2 months ago)
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Django Autoreloader
Autoreload files in browser for Django developement with Linux
## Requirement
Install and run [django-instant](https://github.com/synw/django-instant) for the websockets
## Install
```bash
pip install django-autoreloader
```
Add to settings:```python
INSTANT_SUPERUSER_CHANNELS = [
["$autoreload"]
]
```## Option
Add your watch list in settings.py:
```python
# 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:
```bash
python3 manage.py autoreload
```
## Credits- [Pyinotify](https://github.com/seb-m/pyinotify)
- [Django Instant](https://github.com/synw/django-instant)