Cheat Script (django_new) - RadialDevGroup/heroku-django-template GitHub Wiki
Run this script to simplify creating new Django projects!
#!/bin/bash
if [ "$1" == "" ]; then
echo "Please provide a project name"
else
projectname=$1
mkdir $projectname
cd $projectname
pipenv install django~=2.2
. $(pipenv --venv)/bin/activate
rm -f Pipfile
django-admin.py startproject --template=https://github.com/RadialDevGroup/heroku-django-template/archive/Django-2.2.zip --name=Procfile --name settings.yml --name settings.yml.example $projectname .
deactivate
pipenv install --dev
echo "Great Success!"
echo "Created new Django project. \`cd $1\` and use \`pipenv shell\` to run your manage.py commands"
fi
Install it to someplace in your $PATH
so you can run it just by typing django_new <projectname>
by:
sudo install path/to/django_new.sh /usr/local/bin/django_new