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

Uploaded Source

Built Distribution

django_livereload-1.4-py2.py3-none-any.whl (6.2 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for django-livereload-1.4.tar.gz
Algorithm Hash digest
SHA256 02f7bcacdfedfdd335d830d6f77d7e6afd7e9452d568653c73c56554eb33a7bc
MD5 fd2eebe3ae180f7c6c7ce5e5b32f84d9
BLAKE2b-256 98168c36aac2840c6dceb649ceaf8dc1ca21fb26e0902e49af8acd8d3da46658

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_livereload-1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ed1bcb110f019f09c0ee78f1541248f8dfcdfa12bb7b6660b5da354aaff10d78
MD5 d1f071f1c1ec00d588a11335a169ec33
BLAKE2b-256 24489349e236c51e92e89f328396c162fef06dd324f130f3022d4f62442da5c0

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