Skip to main content

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, before 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

django-livereload-1.7.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

django_livereload-1.7-py2.py3-none-any.whl (6.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-livereload-1.7.tar.gz.

File metadata

File hashes

Hashes for django-livereload-1.7.tar.gz
Algorithm Hash digest
SHA256 4e660863a2901cbda49bbc858f5a890791329453eb4743f2b57aa8a7cd35148e
MD5 80a9c3b48997359fbbbfde1f0f804471
BLAKE2b-256 f64dc5016aead5fc60ffb54cb6f3281b1527aa44d24f918b02f3307371f5e61d

See more details on using hashes here.

File details

Details for the file django_livereload-1.7-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_livereload-1.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b64bb1fc8fa9a99c2386a180d5723bf18024c66174f7d33d5071b628ba029e83
MD5 6dd8d7ac24c4c7d3cde3ee8d1164351b
BLAKE2b-256 12e1e826b31c10604ca237c460c940b697f029f5afe8a61ba34b3f5301b2eebd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page