Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Also check for DJango in pyproject.toml #2479

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ fi
set +e
if [ -e "$SOURCE_DIR/manage.py" ]
then
if grep -iq "Django" "$SOURCE_DIR/$REQUIREMENTS_TXT_FILE"
if grep -iq "Django" "$SOURCE_DIR/$REQUIREMENTS_TXT_FILE" || grep -iq "django" "$SOURCE_DIR/pyproject.toml"
then
echo
echo Content in source directory is a Django app
Expand All @@ -255,8 +255,8 @@ fi
ELAPSED_TIME=$(($SECONDS - $START_TIME))
echo "Done in $ELAPSED_TIME sec(s)."
else
output="Missing Django module in $SOURCE_DIR/$REQUIREMENTS_TXT_FILE"
recommendation="Add Django to your requirements.txt file."
output="Missing Django module in $SOURCE_DIR/$REQUIREMENTS_TXT_FILE or $SOURCE_DIR/pyproject.toml"
recommendation="Add Django to your requirements.txt or pyproject.toml file."
LogWarning "${output} | Exit code: 0 | ${recommendation} | ${moreInformation}"
fi
fi
Expand Down