Skip to content

Commit

Permalink
Install toolbar by default #2940
Browse files Browse the repository at this point in the history
Install django-debug-toolbar by default to simplify its enablement by
users as needed.

Do not use DJANGO_DEBUG env variable anymore as our debug-mode script
would break its use in further uses.
  • Loading branch information
FroggyFlox committed Dec 28, 2024
1 parent b3600ca commit 4faa050
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
1 change: 0 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ PASSWORD_STORE_DIR=/root/.password-store

# Django
DJANGO_SETTINGS_MODULE=settings
#DJANGO_DEBUG=True
9 changes: 1 addition & 8 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,7 @@ env > poetry-install.txt
poetry --version >> poetry-install.txt
poetry self show plugins >> poetry-install.txt
# /usr/local/bin/poetry -> /opt/pipx/venvs/poetry

if [ "$DJANGO_DEBUG" = "True" ]; then
echo "Install Django Debug Toolbar."
poetry install -vvv --no-interaction --no-ansi --with dev >> poetry-install-dev.txt 2>&1
else
echo "Normal install."
poetry install -vvv --no-interaction --no-ansi >> poetry-install.txt 2>&1
fi
poetry install -vvv --no-interaction --no-ansi >> poetry-install.txt 2>&1
echo

# Source package version from pyproject.toml's (version = "5.0.14") via `poetry version` output:
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ URLObject = "==2.1.1"
keyring-pass = "*"
# https://pypi.org/project/supervisor/ 4.1.0 onwards embeds unmaintained meld3
supervisor = "==4.2.4"
django-debug-toolbar = "^4.4.6" # used only when DEBUG = True

# `poetry install --with dev`
[tool.poetry.group.dev]
optional = true

[tool.poetry.group.dev.dependencies]
black = "*"
django-debug-toolbar = "^4.4.6"

[tool.poetry.scripts]
# https://python-poetry.org/docs/pyproject#scripts
Expand Down

0 comments on commit 4faa050

Please sign in to comment.