Skip to content

Commit

Permalink
fixes in 2 scripts : prerequisites and django-heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
omritoptix committed Jun 16, 2013
1 parent 3d6164e commit 981e9d7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
18 changes: 10 additions & 8 deletions heroku-django
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,20 @@ main(){
y|Y)
read -p "Please enter your postgres username:" postgres_username
read -p "Please enter your postgres password:" postgres_password
esac
# create db named : {projectName}_db
local postgres_database_name=${project_name}_db
echo "CREATE DATABASE ${postgres_database_name};" | sudo -u postgres psql
# setting environment variable of DATABASE_URL
echo setting environment variable of DATABASE_URL
export DATABASE_URL=postgresql://${postgres_username}:${postgres_password}@localhost:5432/${postgres_database_name}

#Gal: Lesson2 - run sync db to create the tables in the local database
python manage.py syncdb
esac

#Gal: Lesson2 - create enviroment varialbe in virtual env called DATABASE_URL

read -p "Please enter your database name:" postgres_database_name
echo "CREATE DATABASE ${postgres_database_name};" | sudo -u postgres psql
# setting environment variable of DATABASE_URL
echo setting environment variable of DATABASE_URL
export DATABASE_URL=postgres://${postgres_username}:${postgres_password}localhost:5432/${postgres_database_name}

#Gal: Lesson2 - run sync db to create the tables in the local database
python manage.py syncdb

#Gal: Lesson3 - would you like to add admin interface to you project?

Expand Down
15 changes: 15 additions & 0 deletions install-prerequisites.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@ main{}{

#install heroku toolbelt
wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh

#install postgresql 9.1
sudo apt-get install postgresql-9.1
sudo apt-get install postgresql-client-9.1
sudo apt-get install postgresql-contrib-9.1
sudo apt-get install libpq-dev
sudo apt-get install postgresql-server-dev-9.1
sudo apt-get install pgadmin3

#install python-dev
sudo apt-get install python-dev

#install build-essential
sudo apt-get install build-essential


}

Expand Down

0 comments on commit 981e9d7

Please sign in to comment.