django-debug-toolbar 4.4.3__tar.gz → 4.4.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/PKG-INFO +2 -2
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/README.rst +1 -1
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/__init__.py +1 -1
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/alerts.py +152 -148
- django_debug_toolbar-4.4.4/debug_toolbar/panels/templates/jinja2.py +23 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/templates/panel.py +2 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/docs/changes.rst +9 -1
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/docs/conf.py +1 -1
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/example/settings.py +7 -1
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/example/templates/index.html +1 -0
- django_debug_toolbar-4.4.4/example/templates/jinja2/index.jinja +12 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/example/urls.py +2 -1
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/example/views.py +5 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/panels/test_alerts.py +112 -101
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/panels/test_template.py +16 -1
- django_debug_toolbar-4.4.4/tests/templates/jinja2/base.html +9 -0
- django_debug_toolbar-4.4.4/tests/templates/jinja2/basic.jinja +5 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/test_integration.py +4 -3
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/views.py +1 -1
- django_debug_toolbar-4.4.3/tests/templates/jinja2/basic.jinja +0 -2
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/.editorconfig +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/.github/dependabot.yml +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/.github/workflows/coverage.yml +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/.github/workflows/release.yml +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/.github/workflows/test.yml +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/.gitignore +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/.pre-commit-config.yaml +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/.readthedocs.yaml +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/.tx/config +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/CODE_OF_CONDUCT.md +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/CONTRIBUTING.md +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/LICENSE +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/Makefile +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/_stubs.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/apps.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/decorators.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/forms.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/ca/LC_MESSAGES/django.mo +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/ca/LC_MESSAGES/django.po +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/cs/LC_MESSAGES/django.mo +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/cs/LC_MESSAGES/django.po +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/de/LC_MESSAGES/django.mo +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/de/LC_MESSAGES/django.po +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/en/LC_MESSAGES/django.mo +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/en/LC_MESSAGES/django.po +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/es/LC_MESSAGES/django.mo +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/es/LC_MESSAGES/django.po +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/fa/LC_MESSAGES/django.mo +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/fa/LC_MESSAGES/django.po +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/fi/LC_MESSAGES/django.mo +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/fi/LC_MESSAGES/django.po +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/fr/LC_MESSAGES/django.mo +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/fr/LC_MESSAGES/django.po +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/he/LC_MESSAGES/django.mo +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/he/LC_MESSAGES/django.po +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/id/LC_MESSAGES/django.mo +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/id/LC_MESSAGES/django.po +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/it/LC_MESSAGES/django.mo +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/it/LC_MESSAGES/django.po +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/ja/LC_MESSAGES/django.mo +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/ja/LC_MESSAGES/django.po +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/nl/LC_MESSAGES/django.mo +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/nl/LC_MESSAGES/django.po +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/pl/LC_MESSAGES/django.mo +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/pl/LC_MESSAGES/django.po +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/pt/LC_MESSAGES/django.mo +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/pt/LC_MESSAGES/django.po +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/pt_BR/LC_MESSAGES/django.po +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/ru/LC_MESSAGES/django.mo +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/ru/LC_MESSAGES/django.po +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/sk/LC_MESSAGES/django.mo +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/sk/LC_MESSAGES/django.po +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/sv_SE/LC_MESSAGES/django.mo +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/sv_SE/LC_MESSAGES/django.po +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/uk/LC_MESSAGES/django.mo +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/uk/LC_MESSAGES/django.po +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/zh_CN/LC_MESSAGES/django.mo +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/locale/zh_CN/LC_MESSAGES/django.po +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/management/__init__.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/management/commands/__init__.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/management/commands/debugsqlshell.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/middleware.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/__init__.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/cache.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/headers.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/history/__init__.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/history/forms.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/history/panel.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/history/views.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/profiling.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/redirects.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/request.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/settings.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/signals.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/sql/__init__.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/sql/forms.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/sql/panel.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/sql/tracking.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/sql/utils.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/sql/views.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/staticfiles.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/templates/__init__.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/templates/views.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/timer.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/versions.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/settings.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/static/debug_toolbar/css/print.css +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/static/debug_toolbar/css/toolbar.css +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/static/debug_toolbar/js/history.js +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/static/debug_toolbar/js/redirect.js +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/static/debug_toolbar/js/timer.js +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/static/debug_toolbar/js/toolbar.js +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/static/debug_toolbar/js/utils.js +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/base.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/includes/panel_button.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/includes/panel_content.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/includes/theme_selector.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/panels/alerts.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/panels/cache.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/panels/headers.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/panels/history.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/panels/history_tr.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/panels/profiling.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/panels/request.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/panels/request_variables.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/panels/settings.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/panels/signals.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/panels/sql.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/panels/sql_profile.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/panels/sql_select.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/panels/staticfiles.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/panels/template_source.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/panels/templates.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/panels/timer.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/panels/versions.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templates/debug_toolbar/redirect.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/templatetags/__init__.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/toolbar.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/urls.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/utils.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/views.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/docs/Makefile +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/docs/architecture.rst +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/docs/checks.rst +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/docs/commands.rst +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/docs/configuration.rst +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/docs/contributing.rst +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/docs/index.rst +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/docs/installation.rst +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/docs/make.bat +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/docs/panels.rst +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/docs/spelling_wordlist.txt +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/docs/tips.rst +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/eslint.config.js +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/example/README.rst +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/example/__init__.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/example/django-debug-toolbar.png +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/example/example.db +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/example/manage.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/example/screenshot.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/example/static/test.css +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/example/templates/bad_form.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/example/templates/htmx/boost.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/example/templates/jquery/index.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/example/templates/mootools/index.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/example/templates/prototype/index.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/example/templates/turbo/index.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/example/test_views.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/example/wsgi.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/pyproject.toml +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/requirements_dev.txt +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/setup.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/__init__.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/additional_static/base.css +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/base.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/commands/__init__.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/commands/test_debugsqlshell.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/context_processors.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/forms.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/loaders.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/middleware.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/models.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/panels/__init__.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/panels/test_cache.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/panels/test_custom.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/panels/test_history.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/panels/test_profiling.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/panels/test_redirects.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/panels/test_request.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/panels/test_settings.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/panels/test_sql.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/panels/test_staticfiles.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/panels/test_versions.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/settings.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/sync.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/templates/ajax/ajax.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/templates/base.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/templates/basic.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/templates/registration/login.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/templates/sql/flat.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/templates/sql/included.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/templates/sql/nested.html +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/test_checks.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/test_decorators.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/test_forms.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/test_toolbar.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/test_utils.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/urls.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/urls_invalid.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tests/urls_use_package_urls.py +0 -0
- {django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: django-debug-toolbar
|
|
3
|
-
Version: 4.4.
|
|
3
|
+
Version: 4.4.4
|
|
4
4
|
Summary: A configurable set of panels that display various debug information about the current request/response.
|
|
5
5
|
Project-URL: Download, https://pypi.org/project/django-debug-toolbar/
|
|
6
6
|
Project-URL: Homepage, https://github.com/jazzband/django-debug-toolbar
|
|
@@ -74,7 +74,7 @@ Here's a screenshot of the toolbar in action:
|
|
|
74
74
|
In addition to the built-in panels, a number of third-party panels are
|
|
75
75
|
contributed by the community.
|
|
76
76
|
|
|
77
|
-
The current stable version of the Debug Toolbar is 4.4.
|
|
77
|
+
The current stable version of the Debug Toolbar is 4.4.4. It works on
|
|
78
78
|
Django ≥ 4.2.0.
|
|
79
79
|
|
|
80
80
|
The Debug Toolbar does not currently support `Django's asynchronous views
|
|
@@ -44,7 +44,7 @@ Here's a screenshot of the toolbar in action:
|
|
|
44
44
|
In addition to the built-in panels, a number of third-party panels are
|
|
45
45
|
contributed by the community.
|
|
46
46
|
|
|
47
|
-
The current stable version of the Debug Toolbar is 4.4.
|
|
47
|
+
The current stable version of the Debug Toolbar is 4.4.4. It works on
|
|
48
48
|
Django ≥ 4.2.0.
|
|
49
49
|
|
|
50
50
|
The Debug Toolbar does not currently support `Django's asynchronous views
|
|
@@ -4,7 +4,7 @@ APP_NAME = "djdt"
|
|
|
4
4
|
|
|
5
5
|
# Do not use pkg_resources to find the version but set it here directly!
|
|
6
6
|
# see issue #1446
|
|
7
|
-
VERSION = "4.4.
|
|
7
|
+
VERSION = "4.4.4"
|
|
8
8
|
|
|
9
9
|
# Code that discovers files or modules in INSTALLED_APPS imports this module.
|
|
10
10
|
urls = "debug_toolbar.urls", APP_NAME
|
|
@@ -1,148 +1,152 @@
|
|
|
1
|
-
from html.parser import HTMLParser
|
|
2
|
-
|
|
3
|
-
from django.utils.translation import gettext_lazy as _
|
|
4
|
-
|
|
5
|
-
from debug_toolbar.panels import Panel
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class FormParser(HTMLParser):
|
|
9
|
-
"""
|
|
10
|
-
HTML form parser, used to check for invalid configurations of forms that
|
|
11
|
-
take file inputs.
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
|
-
def __init__(self):
|
|
15
|
-
super().__init__()
|
|
16
|
-
self.in_form = False
|
|
17
|
-
self.current_form = {}
|
|
18
|
-
self.forms = []
|
|
19
|
-
self.form_ids = []
|
|
20
|
-
self.referenced_file_inputs = []
|
|
21
|
-
|
|
22
|
-
def handle_starttag(self, tag, attrs):
|
|
23
|
-
attrs = dict(attrs)
|
|
24
|
-
if tag == "form":
|
|
25
|
-
self.in_form = True
|
|
26
|
-
form_id = attrs.get("id")
|
|
27
|
-
if form_id:
|
|
28
|
-
self.form_ids.append(form_id)
|
|
29
|
-
self.current_form = {
|
|
30
|
-
"file_form": False,
|
|
31
|
-
"form_attrs": attrs,
|
|
32
|
-
"submit_element_attrs": [],
|
|
33
|
-
}
|
|
34
|
-
elif (
|
|
35
|
-
self.in_form
|
|
36
|
-
and tag == "input"
|
|
37
|
-
and attrs.get("type") == "file"
|
|
38
|
-
and (not attrs.get("form") or attrs.get("form") == "")
|
|
39
|
-
):
|
|
40
|
-
self.current_form["file_form"] = True
|
|
41
|
-
elif (
|
|
42
|
-
self.in_form
|
|
43
|
-
and (
|
|
44
|
-
(tag == "input" and attrs.get("type") in {"submit", "image"})
|
|
45
|
-
or tag == "button"
|
|
46
|
-
)
|
|
47
|
-
and (not attrs.get("form") or attrs.get("form") == "")
|
|
48
|
-
):
|
|
49
|
-
self.current_form["submit_element_attrs"].append(attrs)
|
|
50
|
-
elif tag == "input" and attrs.get("form"):
|
|
51
|
-
self.referenced_file_inputs.append(attrs)
|
|
52
|
-
|
|
53
|
-
def handle_endtag(self, tag):
|
|
54
|
-
if tag == "form" and self.in_form:
|
|
55
|
-
self.forms.append(self.current_form)
|
|
56
|
-
self.in_form = False
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
class AlertsPanel(Panel):
|
|
60
|
-
"""
|
|
61
|
-
A panel to alert users to issues.
|
|
62
|
-
"""
|
|
63
|
-
|
|
64
|
-
messages = {
|
|
65
|
-
"form_id_missing_enctype": _(
|
|
66
|
-
'Form with id "{form_id}" contains file input, but does not have the attribute enctype="multipart/form-data".'
|
|
67
|
-
),
|
|
68
|
-
"form_missing_enctype": _(
|
|
69
|
-
'Form contains file input, but does not have the attribute enctype="multipart/form-data".'
|
|
70
|
-
),
|
|
71
|
-
"input_refs_form_missing_enctype": _(
|
|
72
|
-
'Input element references form with id "{form_id}", but the form does not have the attribute enctype="multipart/form-data".'
|
|
73
|
-
),
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
title = _("Alerts")
|
|
77
|
-
|
|
78
|
-
template = "debug_toolbar/panels/alerts.html"
|
|
79
|
-
|
|
80
|
-
def __init__(self, *args, **kwargs):
|
|
81
|
-
super().__init__(*args, **kwargs)
|
|
82
|
-
self.alerts = []
|
|
83
|
-
|
|
84
|
-
@property
|
|
85
|
-
def nav_subtitle(self):
|
|
86
|
-
alerts = self.get_stats()["alerts"]
|
|
87
|
-
if alerts:
|
|
88
|
-
alert_text = "alert" if len(alerts) == 1 else "alerts"
|
|
89
|
-
return f"{len(alerts)} {alert_text}"
|
|
90
|
-
else:
|
|
91
|
-
return ""
|
|
92
|
-
|
|
93
|
-
def add_alert(self, alert):
|
|
94
|
-
self.alerts.append(alert)
|
|
95
|
-
|
|
96
|
-
def check_invalid_file_form_configuration(self, html_content):
|
|
97
|
-
"""
|
|
98
|
-
Inspects HTML content for a form that includes a file input but does
|
|
99
|
-
not have the encoding type set to multipart/form-data, and warns the
|
|
100
|
-
user if so.
|
|
101
|
-
"""
|
|
102
|
-
parser = FormParser()
|
|
103
|
-
parser.feed(html_content)
|
|
104
|
-
|
|
105
|
-
# Check for file inputs directly inside a form that do not reference
|
|
106
|
-
# any form through the form attribute
|
|
107
|
-
for form in parser.forms:
|
|
108
|
-
if (
|
|
109
|
-
form["file_form"]
|
|
110
|
-
and form["form_attrs"].get("enctype") != "multipart/form-data"
|
|
111
|
-
and not any(
|
|
112
|
-
elem.get("formenctype") == "multipart/form-data"
|
|
113
|
-
for elem in form["submit_element_attrs"]
|
|
114
|
-
)
|
|
115
|
-
):
|
|
116
|
-
if form_id := form["form_attrs"].get("id"):
|
|
117
|
-
alert = self.messages["form_id_missing_enctype"].format(
|
|
118
|
-
form_id=form_id
|
|
119
|
-
)
|
|
120
|
-
else:
|
|
121
|
-
alert = self.messages["form_missing_enctype"]
|
|
122
|
-
self.add_alert({"alert": alert})
|
|
123
|
-
|
|
124
|
-
# Check for file inputs that reference a form
|
|
125
|
-
form_attrs_by_id = {
|
|
126
|
-
form["form_attrs"].get("id"): form["form_attrs"] for form in parser.forms
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
for attrs in parser.referenced_file_inputs:
|
|
130
|
-
form_id = attrs.get("form")
|
|
131
|
-
if form_id and attrs.get("type") == "file":
|
|
132
|
-
form_attrs = form_attrs_by_id.get(form_id)
|
|
133
|
-
if form_attrs and form_attrs.get("enctype") != "multipart/form-data":
|
|
134
|
-
alert = self.messages["input_refs_form_missing_enctype"].format(
|
|
135
|
-
form_id=form_id
|
|
136
|
-
)
|
|
137
|
-
self.add_alert({"alert": alert})
|
|
138
|
-
|
|
139
|
-
return self.alerts
|
|
140
|
-
|
|
141
|
-
def generate_stats(self, request, response):
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
1
|
+
from html.parser import HTMLParser
|
|
2
|
+
|
|
3
|
+
from django.utils.translation import gettext_lazy as _
|
|
4
|
+
|
|
5
|
+
from debug_toolbar.panels import Panel
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class FormParser(HTMLParser):
|
|
9
|
+
"""
|
|
10
|
+
HTML form parser, used to check for invalid configurations of forms that
|
|
11
|
+
take file inputs.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def __init__(self):
|
|
15
|
+
super().__init__()
|
|
16
|
+
self.in_form = False
|
|
17
|
+
self.current_form = {}
|
|
18
|
+
self.forms = []
|
|
19
|
+
self.form_ids = []
|
|
20
|
+
self.referenced_file_inputs = []
|
|
21
|
+
|
|
22
|
+
def handle_starttag(self, tag, attrs):
|
|
23
|
+
attrs = dict(attrs)
|
|
24
|
+
if tag == "form":
|
|
25
|
+
self.in_form = True
|
|
26
|
+
form_id = attrs.get("id")
|
|
27
|
+
if form_id:
|
|
28
|
+
self.form_ids.append(form_id)
|
|
29
|
+
self.current_form = {
|
|
30
|
+
"file_form": False,
|
|
31
|
+
"form_attrs": attrs,
|
|
32
|
+
"submit_element_attrs": [],
|
|
33
|
+
}
|
|
34
|
+
elif (
|
|
35
|
+
self.in_form
|
|
36
|
+
and tag == "input"
|
|
37
|
+
and attrs.get("type") == "file"
|
|
38
|
+
and (not attrs.get("form") or attrs.get("form") == "")
|
|
39
|
+
):
|
|
40
|
+
self.current_form["file_form"] = True
|
|
41
|
+
elif (
|
|
42
|
+
self.in_form
|
|
43
|
+
and (
|
|
44
|
+
(tag == "input" and attrs.get("type") in {"submit", "image"})
|
|
45
|
+
or tag == "button"
|
|
46
|
+
)
|
|
47
|
+
and (not attrs.get("form") or attrs.get("form") == "")
|
|
48
|
+
):
|
|
49
|
+
self.current_form["submit_element_attrs"].append(attrs)
|
|
50
|
+
elif tag == "input" and attrs.get("form"):
|
|
51
|
+
self.referenced_file_inputs.append(attrs)
|
|
52
|
+
|
|
53
|
+
def handle_endtag(self, tag):
|
|
54
|
+
if tag == "form" and self.in_form:
|
|
55
|
+
self.forms.append(self.current_form)
|
|
56
|
+
self.in_form = False
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class AlertsPanel(Panel):
|
|
60
|
+
"""
|
|
61
|
+
A panel to alert users to issues.
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
messages = {
|
|
65
|
+
"form_id_missing_enctype": _(
|
|
66
|
+
'Form with id "{form_id}" contains file input, but does not have the attribute enctype="multipart/form-data".'
|
|
67
|
+
),
|
|
68
|
+
"form_missing_enctype": _(
|
|
69
|
+
'Form contains file input, but does not have the attribute enctype="multipart/form-data".'
|
|
70
|
+
),
|
|
71
|
+
"input_refs_form_missing_enctype": _(
|
|
72
|
+
'Input element references form with id "{form_id}", but the form does not have the attribute enctype="multipart/form-data".'
|
|
73
|
+
),
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
title = _("Alerts")
|
|
77
|
+
|
|
78
|
+
template = "debug_toolbar/panels/alerts.html"
|
|
79
|
+
|
|
80
|
+
def __init__(self, *args, **kwargs):
|
|
81
|
+
super().__init__(*args, **kwargs)
|
|
82
|
+
self.alerts = []
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def nav_subtitle(self):
|
|
86
|
+
alerts = self.get_stats()["alerts"]
|
|
87
|
+
if alerts:
|
|
88
|
+
alert_text = "alert" if len(alerts) == 1 else "alerts"
|
|
89
|
+
return f"{len(alerts)} {alert_text}"
|
|
90
|
+
else:
|
|
91
|
+
return ""
|
|
92
|
+
|
|
93
|
+
def add_alert(self, alert):
|
|
94
|
+
self.alerts.append(alert)
|
|
95
|
+
|
|
96
|
+
def check_invalid_file_form_configuration(self, html_content):
|
|
97
|
+
"""
|
|
98
|
+
Inspects HTML content for a form that includes a file input but does
|
|
99
|
+
not have the encoding type set to multipart/form-data, and warns the
|
|
100
|
+
user if so.
|
|
101
|
+
"""
|
|
102
|
+
parser = FormParser()
|
|
103
|
+
parser.feed(html_content)
|
|
104
|
+
|
|
105
|
+
# Check for file inputs directly inside a form that do not reference
|
|
106
|
+
# any form through the form attribute
|
|
107
|
+
for form in parser.forms:
|
|
108
|
+
if (
|
|
109
|
+
form["file_form"]
|
|
110
|
+
and form["form_attrs"].get("enctype") != "multipart/form-data"
|
|
111
|
+
and not any(
|
|
112
|
+
elem.get("formenctype") == "multipart/form-data"
|
|
113
|
+
for elem in form["submit_element_attrs"]
|
|
114
|
+
)
|
|
115
|
+
):
|
|
116
|
+
if form_id := form["form_attrs"].get("id"):
|
|
117
|
+
alert = self.messages["form_id_missing_enctype"].format(
|
|
118
|
+
form_id=form_id
|
|
119
|
+
)
|
|
120
|
+
else:
|
|
121
|
+
alert = self.messages["form_missing_enctype"]
|
|
122
|
+
self.add_alert({"alert": alert})
|
|
123
|
+
|
|
124
|
+
# Check for file inputs that reference a form
|
|
125
|
+
form_attrs_by_id = {
|
|
126
|
+
form["form_attrs"].get("id"): form["form_attrs"] for form in parser.forms
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
for attrs in parser.referenced_file_inputs:
|
|
130
|
+
form_id = attrs.get("form")
|
|
131
|
+
if form_id and attrs.get("type") == "file":
|
|
132
|
+
form_attrs = form_attrs_by_id.get(form_id)
|
|
133
|
+
if form_attrs and form_attrs.get("enctype") != "multipart/form-data":
|
|
134
|
+
alert = self.messages["input_refs_form_missing_enctype"].format(
|
|
135
|
+
form_id=form_id
|
|
136
|
+
)
|
|
137
|
+
self.add_alert({"alert": alert})
|
|
138
|
+
|
|
139
|
+
return self.alerts
|
|
140
|
+
|
|
141
|
+
def generate_stats(self, request, response):
|
|
142
|
+
# check if streaming response
|
|
143
|
+
if getattr(response, "streaming", True):
|
|
144
|
+
return
|
|
145
|
+
|
|
146
|
+
html_content = response.content.decode(response.charset)
|
|
147
|
+
self.check_invalid_file_form_configuration(html_content)
|
|
148
|
+
|
|
149
|
+
# Further alert checks can go here
|
|
150
|
+
|
|
151
|
+
# Write all alerts to record_stats
|
|
152
|
+
self.record_stats({"alerts": self.alerts})
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import functools
|
|
2
|
+
|
|
3
|
+
from django.template.backends.jinja2 import Template as JinjaTemplate
|
|
4
|
+
from django.template.context import make_context
|
|
5
|
+
from django.test.signals import template_rendered
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def patch_jinja_render():
|
|
9
|
+
orig_render = JinjaTemplate.render
|
|
10
|
+
|
|
11
|
+
@functools.wraps(orig_render)
|
|
12
|
+
def wrapped_render(self, context=None, request=None):
|
|
13
|
+
# This patching of render only instruments the rendering
|
|
14
|
+
# of the immediate template. It won't include the parent template(s).
|
|
15
|
+
self.name = self.template.name
|
|
16
|
+
template_rendered.send(
|
|
17
|
+
sender=self, template=self, context=make_context(context, request)
|
|
18
|
+
)
|
|
19
|
+
return orig_render(self, context, request)
|
|
20
|
+
|
|
21
|
+
if JinjaTemplate.render != wrapped_render:
|
|
22
|
+
JinjaTemplate.original_render = JinjaTemplate.render
|
|
23
|
+
JinjaTemplate.render = wrapped_render
|
{django_debug_toolbar-4.4.3 → django_debug_toolbar-4.4.4}/debug_toolbar/panels/templates/panel.py
RENAMED
|
@@ -14,6 +14,7 @@ from django.utils.translation import gettext_lazy as _
|
|
|
14
14
|
from debug_toolbar.panels import Panel
|
|
15
15
|
from debug_toolbar.panels.sql.tracking import SQLQueryTriggered, allow_sql
|
|
16
16
|
from debug_toolbar.panels.templates import views
|
|
17
|
+
from debug_toolbar.panels.templates.jinja2 import patch_jinja_render
|
|
17
18
|
|
|
18
19
|
# Monkey-patch to enable the template_rendered signal. The receiver returns
|
|
19
20
|
# immediately when the panel is disabled to keep the overhead small.
|
|
@@ -25,6 +26,7 @@ if Template._render != instrumented_test_render:
|
|
|
25
26
|
Template.original_render = Template._render
|
|
26
27
|
Template._render = instrumented_test_render
|
|
27
28
|
|
|
29
|
+
patch_jinja_render()
|
|
28
30
|
|
|
29
31
|
# Monkey-patch to store items added by template context processors. The
|
|
30
32
|
# overhead is sufficiently small to justify enabling it unconditionally.
|
|
@@ -4,10 +4,18 @@ Change log
|
|
|
4
4
|
Pending
|
|
5
5
|
-------
|
|
6
6
|
|
|
7
|
+
4.4.4 (2024-07-05)
|
|
8
|
+
------------------
|
|
9
|
+
|
|
10
|
+
* Added check for StreamingHttpResponse in alerts panel.
|
|
11
|
+
* Instrument the Django Jinja2 template backend. This only instruments
|
|
12
|
+
the immediate template that's rendered. It will not provide stats on
|
|
13
|
+
any parent templates.
|
|
14
|
+
|
|
7
15
|
4.4.3 (2024-07-04)
|
|
8
16
|
------------------
|
|
9
17
|
|
|
10
|
-
* Added
|
|
18
|
+
* Added alerts panel with warning when form is using file fields
|
|
11
19
|
without proper encoding type.
|
|
12
20
|
* Fixed overriding font-family for both light and dark themes.
|
|
13
21
|
* Restored compatibility with ``iptools.IpRangeList``.
|
|
@@ -25,7 +25,7 @@ copyright = "{}, Django Debug Toolbar developers and contributors"
|
|
|
25
25
|
copyright = copyright.format(datetime.date.today().year)
|
|
26
26
|
|
|
27
27
|
# The full version, including alpha/beta/rc tags
|
|
28
|
-
release = "4.4.
|
|
28
|
+
release = "4.4.4"
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
# -- General configuration ---------------------------------------------------
|
|
@@ -41,6 +41,12 @@ ROOT_URLCONF = "example.urls"
|
|
|
41
41
|
STATIC_URL = "/static/"
|
|
42
42
|
|
|
43
43
|
TEMPLATES = [
|
|
44
|
+
{
|
|
45
|
+
"NAME": "jinja2",
|
|
46
|
+
"BACKEND": "django.template.backends.jinja2.Jinja2",
|
|
47
|
+
"APP_DIRS": True,
|
|
48
|
+
"DIRS": [os.path.join(BASE_DIR, "example", "templates", "jinja2")],
|
|
49
|
+
},
|
|
44
50
|
{
|
|
45
51
|
"BACKEND": "django.template.backends.django.DjangoTemplates",
|
|
46
52
|
"APP_DIRS": True,
|
|
@@ -54,7 +60,7 @@ TEMPLATES = [
|
|
|
54
60
|
"django.contrib.messages.context_processors.messages",
|
|
55
61
|
],
|
|
56
62
|
},
|
|
57
|
-
}
|
|
63
|
+
},
|
|
58
64
|
]
|
|
59
65
|
|
|
60
66
|
USE_TZ = True
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
<h1>Index of Tests</h1>
|
|
10
10
|
{% cache 10 index_cache %}
|
|
11
11
|
<ul>
|
|
12
|
+
<li><a href="{% url 'jinja' %}">Jinja2</a></li>
|
|
12
13
|
<li><a href="/jquery/">jQuery 3.3.1</a></li>
|
|
13
14
|
<li><a href="/mootools/">MooTools 1.6.0</a></li>
|
|
14
15
|
<li><a href="/prototype/">Prototype 1.7.3.0</a></li>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
|
5
|
+
<title>jinja Test</title>
|
|
6
|
+
</head>
|
|
7
|
+
<body>
|
|
8
|
+
<h1>jinja Test</h1>
|
|
9
|
+
{{ foo }}
|
|
10
|
+
{% for i in range(10) %}{{ i }}{% endfor %} {# Jinja2 supports range(), Django templates do not #}
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -3,7 +3,7 @@ from django.urls import path
|
|
|
3
3
|
from django.views.generic import TemplateView
|
|
4
4
|
|
|
5
5
|
from debug_toolbar.toolbar import debug_toolbar_urls
|
|
6
|
-
from example.views import increment
|
|
6
|
+
from example.views import increment, jinja2_view
|
|
7
7
|
|
|
8
8
|
urlpatterns = [
|
|
9
9
|
path("", TemplateView.as_view(template_name="index.html"), name="home"),
|
|
@@ -12,6 +12,7 @@ urlpatterns = [
|
|
|
12
12
|
TemplateView.as_view(template_name="bad_form.html"),
|
|
13
13
|
name="bad_form",
|
|
14
14
|
),
|
|
15
|
+
path("jinja/", jinja2_view, name="jinja"),
|
|
15
16
|
path("jquery/", TemplateView.as_view(template_name="jquery/index.html")),
|
|
16
17
|
path("mootools/", TemplateView.as_view(template_name="mootools/index.html")),
|
|
17
18
|
path("prototype/", TemplateView.as_view(template_name="prototype/index.html")),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from django.http import JsonResponse
|
|
2
|
+
from django.shortcuts import render
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
def increment(request):
|
|
@@ -8,3 +9,7 @@ def increment(request):
|
|
|
8
9
|
value = 1
|
|
9
10
|
request.session["value"] = value
|
|
10
11
|
return JsonResponse({"value": value})
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def jinja2_view(request):
|
|
15
|
+
return render(request, "index.jinja", {"foo": "bar"}, using="jinja2")
|