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, in the middleware list.

It needs to run after any midddleware that decodes requests (GZipMiddleware), or sets request.META['REMOTE_ADDR'] (like django-xforwardedfor-middleware or django-xff). 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

django_plugin_django_debug_toolbar-0.5.2.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

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

File metadata

File hashes

Hashes for django_plugin_django_debug_toolbar-0.5.2.tar.gz
Algorithm Hash digest
SHA256 2dd88b60930d41e0aaa324cd1f3e9c22d638de47082e347b746c9afa81581c09
MD5 61037fd059a6f6e9259895c8178d19fb
BLAKE2b-256 63b2f9b4b23ca374b6f36ebc55fba42fe9f1a0a8c3dd1437734b7d9b64e049d7

See more details on using hashes here.

Provenance

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

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for django_plugin_django_debug_toolbar-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6efed5da5feb1b82e8e661711845e58877f2f841d6d29b0d292decbbe6e3bf0d
MD5 31a65897f7bd99ff7808af8e4a36a559
BLAKE2b-256 6dc600b199d7c79a43cb63dd1a4645b0db3cdf24bfd8817bbc3a5eb43b6a6356

See more details on using hashes here.

Provenance

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

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page