Created
August 9, 2015 19:49
-
-
Save luiscberrocal/525480de74d4a23d6670 to your computer and use it in GitHub Desktop.
Bash script to create a Django project and a virtual environment for Python3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
VIRTUAL_ENVIRONMENT_FOLDER=~/virtual_environments | |
PYCHARM_PROJECT_FOLDER=~/PycharmProjects/ | |
cd $VIRTUAL_ENVIRONMENT_FOLDER; | |
/usr/local/Cellar/python3/3.4.1_1/bin/python3 /usr/local/lib/python3.4/site-packages/virtualenv.py --no-site-packages $1_env; | |
source $VIRTUAL_ENVIRONMENT_FOLDER/$1_env/bin/activate | |
pip install Django==1.7.9 | |
cd $PYCHARM_PROJECT_FOLDER | |
django-admin.py startproject --template=https://github.com/luiscberrocal/django-twoscoops-project/archive/master.zip --extension=py,rst,html --name=Procfile $1_project | |
PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.3/bin/ | |
pip install psycopg2 | |
echo 'Created environment ' $VIRTUAL_ENVIRONMENT_FOLDER/$1_env | |
echo 'Created project ' $PYCHARM_PROJECT_FOLDER/$1_project |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment