Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save laughinghan/1200091 to your computer and use it in GitHub Desktop.
Save laughinghan/1200091 to your computer and use it in GitHub Desktop.
Create a new Heroku-ready Django project
#!/bin/sh
PROJECT_NAME=$1
if [ -z "$PROJECT_NAME" ]; then
echo "Usage: heroku-ready_django_startproject.sh projectname"
exit
fi
mkdir $PROJECT_NAME
cd $PROJECT_NAME
django-admin.py startproject $PROJECT_NAME
echo "Django==1.3" > requirements.txt
echo "psycopg2" >> requirements.txt
echo "web: bin/python manage.py $PROJECT_NAME/runserver 0.0.0.0:\$PORT --noreload" > Procfile
git init
git add .
git commit -m "initial commit of skeleton Heroku-ready Django project"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment