diff --git a/.coveragerc b/.coveragerc
deleted file mode 100644
index 0e2d03b56..000000000
--- a/.coveragerc
+++ /dev/null
@@ -1,6 +0,0 @@
-[run]
-source = debug_toolbar
-branch = 1
-
-[report]
-omit = *tests*,*migrations*
diff --git a/.eslintrc.json b/.eslintrc.json
deleted file mode 100644
index 8a2452b7a..000000000
--- a/.eslintrc.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "env": {
- "browser": true,
- "es6": true
- },
- "extends": "eslint:recommended",
- "parserOptions": {
- "ecmaVersion": 6,
- "sourceType": "module"
- },
- "rules": {
- "curly": ["error", "all"],
- "dot-notation": "error",
- "eqeqeq": "error",
- "no-eval": "error",
- "no-var": "error",
- "prefer-const": "error",
- "semi": "error"
- }
-}
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 000000000..631ffac41
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,12 @@
+# Description
+
+Please include a summary of the change and which issue is fixed. Please also
+include relevant motivation and context. Your commit message should include
+this information as well.
+
+Fixes # (issue)
+
+# Checklist:
+
+- [ ] I have added the relevant tests for this change.
+- [ ] I have added an item to the Pending section of ``docs/changes.rst``.
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 000000000..be006de9a
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,13 @@
+# Keep GitHub Actions up to date with GitHub's Dependabot...
+# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
+# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem
+version: 2
+updates:
+ - package-ecosystem: github-actions
+ directory: /
+ groups:
+ github-actions:
+ patterns:
+ - "*" # Group all Actions updates into a single larger pull request
+ schedule:
+ interval: weekly
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
new file mode 100644
index 000000000..a0722f0ac
--- /dev/null
+++ b/.github/workflows/coverage.yml
@@ -0,0 +1,33 @@
+# .github/workflows/coverage.yml
+name: Post coverage comment
+
+on:
+ workflow_run:
+ workflows: ["Test"]
+ types:
+ - completed
+
+jobs:
+ test:
+ name: Run tests & display coverage
+ runs-on: ubuntu-latest
+ if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
+ permissions:
+ # Gives the action the necessary permissions for publishing new
+ # comments in pull requests.
+ pull-requests: write
+ # Gives the action the necessary permissions for editing existing
+ # comments (to avoid publishing multiple comments in the same PR)
+ contents: write
+ # Gives the action the necessary permissions for looking up the
+ # workflow that launched this workflow, and download the related
+ # artifact that contains the comment to be published
+ actions: read
+ steps:
+ # DO NOT run actions/checkout here, for security reasons
+ # For details, refer to https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
+ - name: Post comment
+ uses: py-cov-action/python-coverage-comment-action@v3
+ with:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GITHUB_PR_RUN_ID: ${{ github.event.workflow_run.id }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 906d6846b..b57181444 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -11,29 +11,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install -U pip
- python -m pip install -U setuptools twine wheel
+ python -m pip install -U build hatchling twine
- name: Build package
run: |
- python setup.py --version
- python setup.py sdist --format=gztar bdist_wheel
+ hatchling version
+ python -m build
twine check dist/*
- name: Upload packages to Jazzband
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
- uses: pypa/gh-action-pypi-publish@master
+ uses: pypa/gh-action-pypi-publish@release/v1
with:
user: jazzband
password: ${{ secrets.JAZZBAND_RELEASE_KEY }}
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 1b7cd30c3..cd5d8dd8b 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -1,6 +1,11 @@
name: Test
-on: [push, pull_request]
+on:
+ push:
+ pull_request:
+ schedule:
+ # Run weekly on Saturday
+ - cron: '37 3 * * SAT'
jobs:
mysql:
@@ -9,15 +14,15 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
- python-version: ['3.6', '3.7', '3.8', '3.9']
+ python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
services:
mariadb:
- image: mariadb:10.3
+ image: mariadb
env:
- MYSQL_ROOT_PASSWORD: debug_toolbar
+ MARIADB_ROOT_PASSWORD: debug_toolbar
options: >-
- --health-cmd "mysqladmin ping"
+ --health-cmd "mariadb-admin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
@@ -25,32 +30,28 @@ jobs:
- 3306:3306
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
+ allow-prereleases: true
- name: Get pip cache dir
id: pip-cache
run: |
- echo "::set-output name=dir::$(pip cache dir)"
+ echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Cache
- uses: actions/cache@v2
+ uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
- ${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.cfg') }}-${{ hashFiles('**/tox.ini') }}
+ ${{ matrix.python-version }}-v1-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/tox.ini') }}
restore-keys: |
${{ matrix.python-version }}-v1-
- - name: Install enchant (only for docs)
- run: |
- sudo apt-get -qq update
- sudo apt-get -y install enchant
-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
@@ -65,10 +66,6 @@ jobs:
DB_HOST: 127.0.0.1
DB_PORT: 3306
- - name: Upload coverage
- uses: codecov/codecov-action@v1
- with:
- name: Python ${{ matrix.python-version }}
postgres:
runs-on: ubuntu-latest
@@ -76,11 +73,20 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
- python-version: ['3.6', '3.7', '3.8', '3.9']
+ python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
+ database: [postgresql, postgis]
+ # Add psycopg3 to our matrix for modern python versions
+ include:
+ - python-version: '3.10'
+ database: psycopg3
+ - python-version: '3.11'
+ database: psycopg3
+ - python-version: '3.12'
+ database: psycopg3
services:
postgres:
- image: 'postgres:9.5'
+ image: postgis/postgis:14-3.1
env:
POSTGRES_DB: debug_toolbar
POSTGRES_USER: debug_toolbar
@@ -94,31 +100,32 @@ jobs:
--health-retries 5
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
+ allow-prereleases: true
- name: Get pip cache dir
id: pip-cache
run: |
- echo "::set-output name=dir::$(pip cache dir)"
+ echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Cache
- uses: actions/cache@v2
+ uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
- ${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.cfg') }}-${{ hashFiles('**/tox.ini') }}
+ ${{ matrix.python-version }}-v1-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/tox.ini') }}
restore-keys: |
${{ matrix.python-version }}-v1-
- - name: Install enchant (only for docs)
+ - name: Install gdal-bin (for postgis)
run: |
sudo apt-get -qq update
- sudo apt-get -y install enchant
+ sudo apt-get -y install gdal-bin
- name: Install dependencies
run: |
@@ -128,42 +135,38 @@ jobs:
- name: Test with tox
run: tox
env:
- DB_BACKEND: postgresql
+ DB_BACKEND: ${{ matrix.database }}
DB_HOST: localhost
DB_PORT: 5432
- - name: Upload coverage
- uses: codecov/codecov-action@v1
- with:
- name: Python ${{ matrix.python-version }}
-
sqlite:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 5
matrix:
- python-version: ['3.6', '3.7', '3.8', '3.9']
+ python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
+ allow-prereleases: true
- name: Get pip cache dir
id: pip-cache
run: |
- echo "::set-output name=dir::$(pip cache dir)"
+ echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Cache
- uses: actions/cache@v2
+ uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
- ${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.cfg') }}-${{ hashFiles('**/tox.ini') }}
+ ${{ matrix.python-version }}-v1-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/tox.ini') }}
restore-keys: |
${{ matrix.python-version }}-v1-
@@ -178,35 +181,30 @@ jobs:
DB_BACKEND: sqlite3
DB_NAME: ":memory:"
- - name: Upload coverage
- uses: codecov/codecov-action@v1
- with:
- name: Python ${{ matrix.python-version }}
-
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Get pip cache dir
id: pip-cache
run: |
- echo "::set-output name=dir::$(pip cache dir)"
+ echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Cache
- uses: actions/cache@v2
+ uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
- ${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.cfg') }}-${{ hashFiles('**/tox.ini') }}
+ ${{ matrix.python-version }}-v1-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/tox.ini') }}
restore-keys: |
${{ matrix.python-version }}-v1-
@@ -216,4 +214,4 @@ jobs:
python -m pip install --upgrade tox
- name: Test with tox
- run: tox -e docs,style,readme
+ run: tox -e docs,packaging
diff --git a/.gitignore b/.gitignore
index 564e7b8cc..988922d50 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,15 +1,16 @@
*.pyc
*.DS_Store
*~
+.idea
build
-.coverage
+.coverage*
dist
django_debug_toolbar.egg-info
docs/_build
example/db.sqlite3
htmlcov
.tox
-node_modules
-package-lock.json
geckodriver.log
coverage.xml
+.direnv/
+.envrc
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 000000000..291fc94e9
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,59 @@
+repos:
+- repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v4.6.0
+ hooks:
+ - id: check-toml
+ - id: check-yaml
+ - id: end-of-file-fixer
+ - id: trailing-whitespace
+ - id: mixed-line-ending
+ - id: file-contents-sorter
+ files: docs/spelling_wordlist.txt
+- repo: https://github.com/pycqa/doc8
+ rev: v1.1.1
+ hooks:
+ - id: doc8
+- repo: https://github.com/adamchainz/django-upgrade
+ rev: 1.19.0
+ hooks:
+ - id: django-upgrade
+ args: [--target-version, "4.2"]
+- repo: https://github.com/pre-commit/pygrep-hooks
+ rev: v1.10.0
+ hooks:
+ - id: rst-backticks
+ - id: rst-directive-colons
+- repo: https://github.com/pre-commit/mirrors-prettier
+ rev: v4.0.0-alpha.8
+ hooks:
+ - id: prettier
+ entry: env PRETTIER_LEGACY_CLI=1 prettier
+ types_or: [javascript, css]
+ args:
+ - --trailing-comma=es5
+- repo: https://github.com/pre-commit/mirrors-eslint
+ rev: v9.6.0
+ hooks:
+ - id: eslint
+ additional_dependencies:
+ - "eslint@v9.0.0-beta.1"
+ - "@eslint/js@v9.0.0-beta.1"
+ - "globals"
+ files: \.js?$
+ types: [file]
+ args:
+ - --fix
+- repo: https://github.com/astral-sh/ruff-pre-commit
+ rev: 'v0.5.1'
+ hooks:
+ - id: ruff
+ args: [--fix, --exit-non-zero-on-fix]
+ - id: ruff-format
+- repo: https://github.com/tox-dev/pyproject-fmt
+ rev: 2.1.4
+ hooks:
+ - id: pyproject-fmt
+- repo: https://github.com/abravalheri/validate-pyproject
+ rev: v0.18
+ hooks:
+ - id: validate-pyproject
diff --git a/.readthedocs.yaml b/.readthedocs.yaml
new file mode 100644
index 000000000..5843d0212
--- /dev/null
+++ b/.readthedocs.yaml
@@ -0,0 +1,19 @@
+# .readthedocs.yaml
+# Read the Docs configuration file
+# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
+
+version: 2
+
+build:
+ os: ubuntu-22.04
+ tools:
+ python: "3.10"
+
+sphinx:
+ configuration: docs/conf.py
+
+python:
+ install:
+ - requirements: requirements_dev.txt
+ - method: pip
+ path: .
diff --git a/.tx/config b/.tx/config
index bdbb9bf43..5c9ecc129 100644
--- a/.tx/config
+++ b/.tx/config
@@ -6,4 +6,3 @@ lang_map = sr@latin:sr_Latn
file_filter = debug_toolbar/locale//LC_MESSAGES/django.po
source_file = debug_toolbar/locale/en/LC_MESSAGES/django.po
source_lang = en
-
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 000000000..e0d5efab5
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,46 @@
+# Code of Conduct
+
+As contributors and maintainers of the Jazzband projects, and in the interest of
+fostering an open and welcoming community, we pledge to respect all people who
+contribute through reporting issues, posting feature requests, updating documentation,
+submitting pull requests or patches, and other activities.
+
+We are committed to making participation in the Jazzband a harassment-free experience
+for everyone, regardless of the level of experience, gender, gender identity and
+expression, sexual orientation, disability, personal appearance, body size, race,
+ethnicity, age, religion, or nationality.
+
+Examples of unacceptable behavior by participants include:
+
+- The use of sexualized language or imagery
+- Personal attacks
+- Trolling or insulting/derogatory comments
+- Public or private harassment
+- Publishing other's private information, such as physical or electronic addresses,
+ without explicit permission
+- Other unethical or unprofessional conduct
+
+The Jazzband roadies have the right and responsibility to remove, edit, or reject
+comments, commits, code, wiki edits, issues, and other contributions that are not
+aligned to this Code of Conduct, or to ban temporarily or permanently any contributor
+for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
+
+By adopting this Code of Conduct, the roadies commit themselves to fairly and
+consistently applying these principles to every aspect of managing the jazzband
+projects. Roadies who do not follow or enforce the Code of Conduct may be permanently
+removed from the Jazzband roadies.
+
+This code of conduct applies both within project spaces and in public spaces when an
+individual is representing the project or its community.
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by
+contacting the roadies at `roadies@jazzband.co`. All complaints will be reviewed and
+investigated and will result in a response that is deemed necessary and appropriate to
+the circumstances. Roadies are obligated to maintain confidentiality with regard to the
+reporter of an incident.
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version
+1.3.0, available at [https://contributor-covenant.org/version/1/3/0/][version]
+
+[homepage]: https://contributor-covenant.org
+[version]: https://contributor-covenant.org/version/1/3/0/
diff --git a/LICENSE b/LICENSE
index 15d830926..221d73313 100644
--- a/LICENSE
+++ b/LICENSE
@@ -4,10 +4,10 @@ All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
- 1. Redistributions of source code must retain the above copyright notice,
+ 1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
+
+ 2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
diff --git a/MANIFEST.in b/MANIFEST.in
deleted file mode 100644
index e3d4782fc..000000000
--- a/MANIFEST.in
+++ /dev/null
@@ -1,6 +0,0 @@
-include LICENSE
-include README.rst
-include CONTRIBUTING.md
-recursive-include debug_toolbar/locale *
-recursive-include debug_toolbar/static *
-recursive-include debug_toolbar/templates *
diff --git a/Makefile b/Makefile
index 5b5ca4d76..24b59ab95 100644
--- a/Makefile
+++ b/Makefile
@@ -1,22 +1,4 @@
-.PHONY: flake8 example test coverage translatable_strings update_translations
-
-PRETTIER_TARGETS = '**/*.(css|js)'
-
-style: package-lock.json
- isort .
- black --target-version=py36 .
- flake8
- npx eslint --ignore-path .gitignore --fix .
- npx prettier --ignore-path .gitignore --write $(PRETTIER_TARGETS)
- ! grep -r '\(style=\|onclick=\|
{% endblock %}
+ {{ toolbar.config.ROOT_TAG_EXTRA_ATTRS|safe }} data-update-on-fetch="{{ toolbar.config.UPDATE_ON_FETCH }}"
+ data-theme="{{ toolbar.config.DEFAULT_THEME }}">
- {% if toolbar.store_id %}
+ {% if toolbar.should_render_panels %}
+ {% for script in panel.scripts %}{% endfor %}
+
{{ panel.content }}
+ {% else %}
- {% else %}
-
{{ panel.content }}
{% endif %}
diff --git a/debug_toolbar/templates/debug_toolbar/includes/theme_selector.html b/debug_toolbar/templates/debug_toolbar/includes/theme_selector.html
new file mode 100644
index 000000000..926ff250b
--- /dev/null
+++ b/debug_toolbar/templates/debug_toolbar/includes/theme_selector.html
@@ -0,0 +1,41 @@
+
+
+
diff --git a/debug_toolbar/templates/debug_toolbar/panels/alerts.html b/debug_toolbar/templates/debug_toolbar/panels/alerts.html
new file mode 100644
index 000000000..df208836d
--- /dev/null
+++ b/debug_toolbar/templates/debug_toolbar/panels/alerts.html
@@ -0,0 +1,12 @@
+{% load i18n %}
+
+{% if alerts %}
+ {% trans "Alerts found" %}
+ {% for alert in alerts %}
+
+ {% endfor %}
+{% else %}
+ {% trans "No alerts found" %}
+{% endif %}
diff --git a/debug_toolbar/templates/debug_toolbar/panels/history.html b/debug_toolbar/templates/debug_toolbar/panels/history.html
index f5e967a17..840f6c9f4 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/history.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/history.html
@@ -1,6 +1,6 @@
{% load i18n %}{% load static %}
@@ -10,6 +10,7 @@
{% trans "Method" %} |
{% trans "Path" %} |
{% trans "Request Variables" %} |
+ {% trans "Status" %} |
{% trans "Action" %} |
diff --git a/debug_toolbar/templates/debug_toolbar/panels/history_tr.html b/debug_toolbar/templates/debug_toolbar/panels/history_tr.html
index 9ce984396..eff544f1a 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/history_tr.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/history_tr.html
@@ -38,9 +38,12 @@
+
+ {{ store_context.toolbar.stats.HistoryPanel.status_code|escape }}
+ |
|
diff --git a/debug_toolbar/templates/debug_toolbar/panels/logging.html b/debug_toolbar/templates/debug_toolbar/panels/logging.html
deleted file mode 100644
index 54fe3bebe..000000000
--- a/debug_toolbar/templates/debug_toolbar/panels/logging.html
+++ /dev/null
@@ -1,27 +0,0 @@
-{% load i18n %}
-{% if records %}
-
-
-
- {% trans "Level" %} |
- {% trans "Time" %} |
- {% trans "Channel" %} |
- {% trans "Message" %} |
- {% trans "Location" %} |
-
-
-
- {% for record in records %}
-
- {{ record.level }} |
- {{ record.time|date:"h:i:s m/d/Y" }} |
- {{ record.channel|default:"-" }} |
- {{ record.message|linebreaksbr }} |
- {{ record.file }}:{{ record.line }} |
-
- {% endfor %}
-
-
-{% else %}
- {% trans "No messages logged" %}.
-{% endif %}
diff --git a/debug_toolbar/templates/debug_toolbar/panels/profiling.html b/debug_toolbar/templates/debug_toolbar/panels/profiling.html
index 837698889..4c1c3acd3 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/profiling.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/profiling.html
@@ -12,7 +12,7 @@
{% for call in func_list %}
-
+
{% if call.has_subfuncs %}
diff --git a/debug_toolbar/templates/debug_toolbar/panels/request.html b/debug_toolbar/templates/debug_toolbar/panels/request.html
index 3f9b068be..076d5f74f 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/request.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/request.html
@@ -20,28 +20,28 @@ {% trans "View information" %}
|
-{% if cookies %}
+{% if cookies.list or cookies.raw %}
{% trans "Cookies" %}
{% include 'debug_toolbar/panels/request_variables.html' with variables=cookies %}
{% else %}
{% trans "No cookies" %}
{% endif %}
-{% if session %}
+{% if session.list or session.raw %}
{% trans "Session data" %}
{% include 'debug_toolbar/panels/request_variables.html' with variables=session %}
{% else %}
{% trans "No session data" %}
{% endif %}
-{% if get %}
+{% if get.list or get.raw %}
{% trans "GET data" %}
{% include 'debug_toolbar/panels/request_variables.html' with variables=get %}
{% else %}
{% trans "No GET data" %}
{% endif %}
-{% if post %}
+{% if post.list or post.raw %}
{% trans "POST data" %}
{% include 'debug_toolbar/panels/request_variables.html' with variables=post %}
{% else %}
diff --git a/debug_toolbar/templates/debug_toolbar/panels/request_variables.html b/debug_toolbar/templates/debug_toolbar/panels/request_variables.html
index 7e9118c7d..92200f867 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/request_variables.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/request_variables.html
@@ -1,5 +1,6 @@
{% load i18n %}
+{% if variables.list %}
@@ -12,7 +13,7 @@
- {% for key, value in variables %}
+ {% for key, value in variables.list %}
{{ key|pprint }} |
{{ value|pprint }} |
@@ -20,3 +21,6 @@
{% endfor %}
+{% elif variables.raw %}
+{{ variables.raw|pprint }}
+{% endif %}
diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html
index 6080e9f19..e5bf0b7f6 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/sql.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html
@@ -77,7 +77,7 @@
{% if query.params %}
{% if query.is_select %}
+
+
+
+ Home
+
+
+
diff --git a/example/templates/index.html b/example/templates/index.html
index 1616d3248..4b25aefca 100644
--- a/example/templates/index.html
+++ b/example/templates/index.html
@@ -9,11 +9,43 @@
Index of Tests
{% cache 10 index_cache %}
Django Admin
{% endcache %}
+
+ Value
+ {{ request.session.value|default:0 }}
+
+
+
+