Skip to main content

Django plugin that configures the Django Debug Toolbar

Project description

django-plugin-django-debug-toolbar

PyPI Changelog Tests License

Django plugin that installs and configures the Django Debug Toolbar

Goal

The Django Debug Toolbar is amazingly useful for development. It's so powerful that it's very dangerous to activate it in production.

The goal of this plugin is to enable a developer to activate the Django Debug Toolbar with the minimum number of steps, while keeping debug related code out of the codebase.

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 (using their numbering):

But you still need to:

Middleware ordering

This plugin injects the Debug Toolbar Middleware early, but not too early.

It needs to run after any midddleware that decodes requests (GZipMiddleware), or sets request.META['REMOTE_ADDR'] (like XForwardedForMiddleware). If you have any other middleware that needs to run before the Debug Toolbar Middleware, please open a ticket and we'll add it to the TOOLBAR_MUST_GO_AFTER list.

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

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

Built Distribution

File details

Details for the file django_plugin_django_debug_toolbar-0.4.0.tar.gz.

File metadata

File hashes

Hashes for django_plugin_django_debug_toolbar-0.4.0.tar.gz
Algorithm Hash digest
SHA256 08998c1b262e7fb4caa32c55cfe5518bd701e773e37a0ef7eb296cbd8518cb0e
MD5 51c5e2433c91f511d0424e38b63624e3
BLAKE2b-256 f739f181001229cfa3e921e1a2170a263c384e81944f4975d00972e667194e72

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_plugin_django_debug_toolbar-0.4.0.tar.gz:

Publisher: publish.yml on tomviner/django-plugin-django-debug-toolbar

Attestations:

File details

Details for the file django_plugin_django_debug_toolbar-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_plugin_django_debug_toolbar-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3600ea36deaa377489f7edc903d7098ab59db62da8edf0fb135c214b6be0a3d5
MD5 f42381b91b2b48b4c889986921b1755f
BLAKE2b-256 cda43542473ee243d25dca0347b1457b46df7fb9d3bb49179a53f133dde0236d

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_plugin_django_debug_toolbar-0.4.0-py3-none-any.whl:

Publisher: publish.yml on tomviner/django-plugin-django-debug-toolbar

Attestations:

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