Removed the command 'run-script' and added the command 'shell', and updated the docs and README
This commit is contained in:
parent
a9c5ec34fc
commit
aa85ac5ffc
5 changed files with 38 additions and 44 deletions
|
@ -1,21 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# run a script in the context of the django project
|
||||
|
||||
export DJANGO_DEBUG="true"
|
||||
|
||||
if [ -z $2 ]; then
|
||||
|
||||
echo "Missing second argument <path>: the path to the script"
|
||||
|
||||
else
|
||||
|
||||
oldcwd="$(pwd)"
|
||||
script_path=$2
|
||||
echo "Starting $2 in a django shell:"
|
||||
echo -e "--------------------------------------------------------------------------------\n"
|
||||
cat "$script_path" | "$(pwd)/application/manage.py" shell
|
||||
echo -e "\n--------------------------------------------------------------------------------"
|
||||
cd "$oldcwd"
|
||||
|
||||
fi
|
12
lib/start-django-shell.sh
Normal file
12
lib/start-django-shell.sh
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# start a django shell
|
||||
|
||||
export DJANGO_DEBUG="true"
|
||||
|
||||
oldcwd="$(pwd)"
|
||||
echo "Starting a django shell..."
|
||||
echo -e "--------------------------------------------------------------------------------\n"
|
||||
"$(pwd)/application/manage.py" shell
|
||||
echo -e "\n--------------------------------------------------------------------------------"
|
||||
cd "$oldcwd"
|
Loading…
Add table
Add a link
Reference in a new issue