LiveReload with the Django development server
Project description
Application performing a LiveReload with tiny-lr once the development server is ready.
Why this project ?
I recently started using Gulp and LiveReload to automatize some tasks. Everytime an HTML, CSS or JS file changes, a livereload is performed in the browser to reflect those changes, and I was pretty happy with that.
But I found one limitation, I cannot perform a livereload of the current page when editing Python files because the development server provided by Django is not necessary ready as soon as the livereload request is emitted.
That’s why I created this application.
Installation
First install the package on your system:
$ pip install django-livereload
Then register the 'livereload' application in your INSTALLED_APPS setting, after the 'django.contrib.staticfiles' application if used.
Usage
If the livereload server provided by tiny-lr is launched (via Gulp, Grunt or whatever), the runserver command will do a livereload on your browser whenever the Django development server is ready.
The script
If you want to livereload-js script injected into your pages because you don’t want to deal with a plug-in, simply register this middleware in your project: 'livereload.middleware.LiveReloadScript'.
Project details
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
File details
Details for the file django-livereload-1.2.tar.gz
.
File metadata
- Download URL: django-livereload-1.2.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9c77ed53ef57fcd2f900d3c7ddc56a08036ab24e4c39fca666add26fe4b1540 |
|
MD5 | acf476edacde14b42b3f7163892fdd9f |
|
BLAKE2b-256 | fcaed60df6ba5d1d0574b5497f75b8c2dfe61b5f372c66e45c7022dbf0469cc3 |
File details
Details for the file django_livereload-1.2-py2.py3-none-any.whl
.
File metadata
- Download URL: django_livereload-1.2-py2.py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc54e3807fd538ea9b732a5ec198768222b355a755334134f6fdbf08818a8ce6 |
|
MD5 | 841b50f019827ed02082b9089c101622 |
|
BLAKE2b-256 | c7b993f8d95f32c83b5471e546250bce84766a184884141ef3c6e69fb3f5cdc8 |