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

django-livereload-1.3.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

django_livereload-1.3-py2.py3-none-any.whl (6.1 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for django-livereload-1.3.tar.gz
Algorithm Hash digest
SHA256 81ff02e5aa2861535e315402506748e9971a24068dcfe5695fce4fd6565a1658
MD5 ef07c8f7fe07610716a0fd7f52a070ea
BLAKE2b-256 d4a9cc6b186402bf0c83196cd1f120a5fb578f7bb33e6447a40643092eb7b981

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_livereload-1.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 efc7d7d841e67164874ee843d0d996c6d7b625a663f1488180824e1584d92e57
MD5 a03d83db1c0bdd54b05a010136ed1891
BLAKE2b-256 da92b8e148d7295e2ce084497c4a6f1e10fdf4693f1bb0a81f363bdda6e05782

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