Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions test-django-debug-toolbar/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[project]
name = "test-django-debug-toolbar"
version = "0"
requires-python = ">=3.12"

dependencies = [
"django>=5.2",
"django-debug-toolbar>=5.0.1",
"ipdb>=0.13.13",
"psycopg>=3.2.6",
"sentry-sdk[django]",
"strawberry-graphql>=0.243.0",
"strawberry-graphql-django>=0.51.1",
]

[tool.uv.sources]
sentry-sdk = { path = "../../sentry-python", editable = true }
8 changes: 0 additions & 8 deletions test-django-debug-toolbar/requirements.txt

This file was deleted.

20 changes: 5 additions & 15 deletions test-django-debug-toolbar/run.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
#!/usr/bin/env bash
set -euo pipefail

# exit on first error
set -xe
if ! command -v uv &> /dev/null; then
curl -LsSf https://astral.sh/uv/install.sh | sh
fi

# create and activate virtual environment
python -m venv .venv
source .venv/bin/activate

# Install (or update) requirements
python -m pip install -r requirements.txt

# run migrations
# ./manage.py migrate

# Run Django application on localhost:8000
./manage.py runserver 0.0.0.0:8000
#gunicorn movie_search.project.asgi:application -k uvicorn.workers.UvicornWorker
uv run ./manage.py runserver 0.0.0.0:8000

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The run.sh script calls ./manage.py from the wrong directory. It needs to change into the mysite subdirectory before executing the command.
Severity: HIGH

Suggested Fix

Update the script to change the current directory to mysite before running the manage.py command. A similar project uses cd mysite && uv run python ./manage.py runserver 0.0.0.0:8000 && cd .. which would resolve the issue.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: test-django-debug-toolbar/run.sh#L8

Potential issue: The `run.sh` script attempts to execute `uv run ./manage.py runserver
0.0.0.0:8000` from the `test-django-debug-toolbar/` directory. However, the `manage.py`
file is actually located within the `test-django-debug-toolbar/mysite/` subdirectory.
Because the path is incorrect, the script will fail at runtime with a 'No such file or
directory' error when it tries to find `manage.py`.

Did we get this right? 👍 / 👎 to inform future reviews.

Loading