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.6.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for django-livereload-1.6.tar.gz
Algorithm Hash digest
SHA256 e002df87b572a4ee6f531b1ed1f5c29138c211de2e3c428b05d329d929cc6c69
MD5 aed6b9763dc972284765d725f113d0d2
BLAKE2b-256 15d32e2837da8ec1bab7be7c86f1196f2b5dea3c847b037d359194a2189dfa30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_livereload-1.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f7e0cf481265635d09b4c355a0b492ac277b10a317af14b1d640ccd32e2269e2
MD5 3e9ed02529350c92280b4d8a90e9ae56
BLAKE2b-256 77b02a0087595f20a879f5a6351f22ead15ad62fb8e31e74a4f8d247d0331749

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