Skip to main content

django-template-debug

A small collection of template tags for debugging and introspecting Django templates

Documentation

Requirements

None, but the latest ipdb is highly recommended.

Installation

django-template-debug is available on pypi, so the easiest way to install it is using pip:

pip install django-template-debug

Setup

Add ‘template_debug’ to the INSTALLED_APPS iterable in your settings file. For example:

INSTALLED_APPS = (
    ...
    'template_debug',
    ...
)

Add TEMPLATE_DEBUG = True to your local or development settings if it is not already set.

  • Unless TEMPLATE_DEBUG is set to True, the django-template-debug templates will return an empty string without doing anything. This behavior prevents your application from calling set_trace() or print in a production environment if django-template-debug template tags are accidentally commited and deployed.

Usage

Add {% load debug_tags %} in any Django template.

The available tags to use are {% set_trace %} {% variables %} {% attributes varname %} and {% details varname %}

See Example Usage docs for more details

Developer Setup

Create a fresh virtualenv and install the test requirements:

mkvirtualenv template-debug
pip install -r requirements/test.txt

Use manage.py in the project directory along with the example.settings file for local testing.

To run unittests using the virtualenv’s Python and Django, use the runtests script. To test all supported versions of Python and Django, run the unittests using tox.

Metadata

Release files for django-template-debug 0.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-template-debug 0.3.5
File Size Uploaded Provenance Actions
django-template-debug-0.3.5.tar.gz 10.1 kB Without provenance Details for django-template-debug-0.3.5.tar.gz

Release files / django-template-debug-0.3.5.tar.gz

Download URL django-template-debug-0.3.5.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d7fd8234b26d9df4b30aa3f33d9283c6ef9525b94e0ddb3e91c48ee8b7472049
BLAKE2b-256 checksum
How to use checksums
de5dd38cac8f0c00e888e2edf467a18bdbe2b031394668e3cb8959327302ee47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-template-debug 0.3.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page