A template tag for dropping into a debugger inside a Django template.
Project description
django-template-breakpoint
Drop into a Python debugger from inside your Django templates.
Inspired by django-template-debug.
Installation
Install with pip:
python -m pip install django-template-breakpoint
Usage
Add the app to your INSTALLED_APPS
setting:
INSTALLED_APPS = [
...,
"django_template_breakpoint",
...,
]
In a template, load the tag:
{% load breakpoint %}
Then set the breakpoint:
{% breakpoint %}
When this line is rendered by Django, sys.breakpointhook()
will be called.
By default, this calls pdb.set_trace()
.
All template variables in use are added to the current scope.
If using pdb.set_trace()
,
you can run dir()
to see the names of all template variables.
Development
There's a test! Run it with python -m pytest
.
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for django_template_breakpoint-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b67220b8b5c6ea5fa5d03e6b1583182f2498d01004a23a782ec9a865df1c1e22 |
|
MD5 | 24d56f9c0b3cb58568f67bebbfb4911d |
|
BLAKE2b-256 | c78caf632c65fc825a4efee9e5676307cb19958d1a0da95744a0ddddb9534cc4 |
Close
Hashes for django_template_breakpoint-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 000565b507de7858f7f5cc3b406c3e0c9d3738c24677b1143435bf36117540da |
|
MD5 | edb161229f97f08ce919d3e812772797 |
|
BLAKE2b-256 | 804a35867a6195ecce7b71fb5a1751732f8b2f1eb01122664cf840a38d2fe784 |