Skip to content

tomviner/django-plugin-django-debug-toolbar

Repository files navigation

django-plugin-django-debug-toolbar

PyPI Changelog Tests License

Django plugin that installs and configures the Django Debug Toolbar

Installation

First configure your Django project to use DJP.

Then install this plugin in the same environment as your Django application.

pip install django-plugin-django-debug-toolbar

Usage

Looking at Django Debug Toolbar's installation instructions, this plugin takes care of the following steps (and using their numbering):

  • #1. Install the Package
  • #3. Install the App
  • #4. Add the URLs
  • #5. Add the Middleware
  • #6. Configure Internal IPs
    • to include 127.0.0.1

But you still need to:

  • #2. Check for Prerequisites
    • like settings for static files and templates
  • #6. Configure Internal IPs
    • if you require IPs other than 127.0.0.1, set them in INTERNAL_IPS in your settings
  • #7. Disable the toolbar when running tests (optional)
    • perhaps do this by disabling djp when testing

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd django-plugin-django-debug-toolbar
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

python -m pytest

About

Django plugin that configures the Django Debug Toolbar

Resources

License

Stars

Watchers

Forks

Packages

No packages published