All Projects → tjwalch → Django Livereload Server

tjwalch / Django Livereload Server

Licence: bsd-3-clause
Livereload functionality integrated with your Django development environment.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Django Livereload Server

Ergo
The management of multiple apps running over different ports made easy
Stars: ✭ 452 (+112.21%)
Mutual labels:  tools, development
vistir
Setup / utilities which most projects eventually need
Stars: ✭ 30 (-85.92%)
Mutual labels:  development, tools
solidus dev support
A collection of tools for developing Solidus extensions.
Stars: ✭ 14 (-93.43%)
Mutual labels:  development, tools
Micro Dev
The development environment for `micro`
Stars: ✭ 630 (+195.77%)
Mutual labels:  tools, development
Gdbstub
A simple, dependency-free GDB stub that can be easily dropped in to your project.
Stars: ✭ 56 (-73.71%)
Mutual labels:  tools, development
Androidappydevelopertools
A list of cool/useful Apps too help Android Developers
Stars: ✭ 116 (-45.54%)
Mutual labels:  tools, development
Tutorialdb
A search 🔎 engine for programming/dev tutorials, See it in action 👉
Stars: ✭ 93 (-56.34%)
Mutual labels:  django, tools
Awesome Http Benchmark
HTTP(S) benchmark tools, testing/debugging, & restAPI (RESTful)
Stars: ✭ 2,236 (+949.77%)
Mutual labels:  tools, development
Django Geojson
django-geojson is a collection of helpers to (de)serialize (Geo)Django objects into GeoJSON.
Stars: ✭ 209 (-1.88%)
Mutual labels:  django
Cookiecutter Django Vue Graphql Aws
A highly opinionated Cookiecutter template that fuses together Django, Vue.js, GraphQL, and AWS into one full-stack web application.
Stars: ✭ 213 (+0%)
Mutual labels:  django
Quickstrom
High-confidence browser testing
Stars: ✭ 208 (-2.35%)
Mutual labels:  tools
Django Sendsms
A simple API to send SMS messages. It is modeled after the django email api.
Stars: ✭ 208 (-2.35%)
Mutual labels:  django
Silverstrike
Finance Management Made Easy
Stars: ✭ 213 (+0%)
Mutual labels:  django
Csdnbot
CSDN 资源下载器
Stars: ✭ 209 (-1.88%)
Mutual labels:  django
Systemjs Hot Reloader
reloads your modules as needed so that you can have satisfyingly fast feedback loop when developing your app
Stars: ✭ 215 (+0.94%)
Mutual labels:  tools
Tenma
Comic book server with in-browser reader
Stars: ✭ 207 (-2.82%)
Mutual labels:  django
Py Elasticsearch Django
基于python语言开发的千万级别搜索引擎
Stars: ✭ 207 (-2.82%)
Mutual labels:  django
My Development Tools
我的开发工具箱
Stars: ✭ 216 (+1.41%)
Mutual labels:  tools
Automagic
web automated test platform with Python Django
Stars: ✭ 215 (+0.94%)
Mutual labels:  django
Graphene File Upload
Enhances Graphene Django GraphQL Server for intuitive file uploads via GraphQL mutations.
Stars: ✭ 210 (-1.41%)
Mutual labels:  django

======================== django-livereload-server

This django app adds a management command that starts a livereload server watching all your static files and templates as well as a custom runserver command that issues livereload requests when the development server is ready after a restart.

Installation

Install package: ::

$ pip install django-livereload-server

Add 'livereload' to the INSTALLED_APPS, before 'django.contrib.staticfiles' if this is used::

INSTALLED_APPS = (
    ...
    'livereload',
    ...
)

Add 'livereload.middleware.LiveReloadScript' to MIDDLEWARE_CLASSES (probably at the end)::

MIDDLEWARE_CLASSES = (
    ...
    'livereload.middleware.LiveReloadScript',
)

Or to MIDDLEWARE for Django >= 1.10::

MIDDLEWARE = [
    ...
    'livereload.middleware.LiveReloadScript',
]

This will inject the livereload.js script into your webpages if DEBUG setting is on.

Configuration

If you need the livereload server to use a different host and port than the default 127.0.0.1 and 35729, specify them by setting LIVERELOAD_HOST and LIVERELOAD_PORT in settings.py.

Usage

Start the livereload server::

$ python manage.py livereload

keep the livereload server running.

Start the django development server as usual (in another console)::

$ python manage.py runserver

In the browser's address bar access your web app by doing:

127.0.0.1:8000 or localhost:8000

now every time you hit save in your editor, the django-development-server/livereload-server automatically updates the staticfiles

Customization

By default both template and staticfiles directories are watched.

You can ignore template directories using: ::

$ ./manage.py livereload --ignore-template-dirs

Or staticfiles directories using: ::

$ ./manage.py livereload --ignore-static-dirs

You can ignore file extensions: ::

$ ./manage.py livereload --ignore-file-extensions=.less,.scss

Extra files and/or paths to watch for changes can be added as positional arguments. By default livereload server watches the files that are found by your staticfiles finders and your template loaders. ::

$ python manage.py livereload path/to/my-extra-directory/

This will be excluded from the paths ignored by --ignore-template-dirs and --ignore-static-dirs.

Host and port can be overridden with --host and --port options. ::

$ python manage.py livereload --host=myhost.com --port=9090

the runserver command python manage.py runserver also accepts three additional options::

  • --nolivereload to disable livereload functionality
  • --livereload-host to override both default and settings file specified host address
  • --livereload-port to override both default and settings file specified port

Background

This project is based on a merge of python-livereload <https://github.com/lepture/python-livereload>_ and django-livereload <https://github.com/Fantomas42/django-livereload>_, excellent projects both and even better for smooth django development when combined.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].