Skip to main content

Automatically reloads your browser when a template, css or javascript file was modified.

Project description

django-debug-toolbar-autoreload

This package contains an extra panel for the excellent django-debug-toolbar.

The purpose is to automatically reload the page if a template that was used to render the current page is changed. It is for your browser what the runserver’s auto-reload feature is for your python code.

Install

  1. Put the debug_toolbar_autoreload source folder in your PYTHONPATH.

  2. Add 'debug_toolbar_autoreload' to your INSTALLED_APPS settings.

  3. Add 'debug_toolbar_autoreload.AutoreloadPanel' to your DEBUG_TOOLBAR_PANELS.

This means your settings file should look something like:

INSTALLED_APPS = (
    # ... other apps ...
    'debug_toolbar',
    'debug_toolbar_autoreload',
)

DEBUG_TOOLBAR_PANELS = (
    # default panels
    'debug_toolbar.panels.version.VersionDebugPanel',
    'debug_toolbar.panels.timer.TimerDebugPanel',
    'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel',
    'debug_toolbar.panels.headers.HeaderDebugPanel',
    'debug_toolbar.panels.profiling.ProfilingDebugPanel',
    'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',
    'debug_toolbar.panels.sql.SQLDebugPanel',
    'debug_toolbar.panels.template.TemplateDebugPanel',
    'debug_toolbar.panels.cache.CacheDebugPanel',
    'debug_toolbar.panels.signals.SignalDebugPanel',
    'debug_toolbar.panels.logger.LoggingPanel',

    # autoreload panel
    'debug_toolbar_autoreload.AutoreloadPanel',
)

Requirements: Django 1.4 or higher is required since we need a multithreaded development server.

Contribute

  1. Download and setup the project:

    git clone https://github.com/gregmuellegger/django-debug-toolbar-autoreload.git
    cd django-debug-toolbar-autoreload
    virtualenv .
    source bin/activate
    pip install -r requirements/development.txt
    python manage.py syncdb
    python manage.py runserver
  2. Open one of the demo pages from http://localhost:8000/ in your browser.

  3. Hack

  4. Send a pull request

Changelog

0.1.1

  • Try to detect if development server wants to shutdown. Before this change was the server still running in the background and didn’t allow you to restart it again.

0.1.0

  • Initial release.

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-debug-toolbar-autoreload-0.1.1.tar.gz (9.1 kB view hashes)

Uploaded Source

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