This project uses Django.
Before you create a workspace in Cloud9, do the steps below to make sure your SSH key is set up.
- In Cloud9, go to the settings and click on the "SSH Keys" tab.
- Copy the ssh key and go to your Github account settings.
- Click on "SSH and GPG Keys", then click add "New SSH Key". Put "Cloud9" for the title and then paste in the key from Cloud9.
- Click "Add SSH Key".
- Next, edit or create an authorized_keys file.
touch ~/.ssh/authorized_keys- Paste in your SSH key from Cloud9, the same one that you pasted into Github.
- Create an account in Cloud9 and log in.
- Click Create a new workspace. Name your workspace something like "fair-play-hackathon" whatever.
- In the field that says Clone from Git or Mercurial URL, put in
git@github.com:silverli/FairPlay.git - Under Choose a Template, pick "Django".
When you run the project, you will run into errors.
Type in sudo pip install psycopg2
Start the database with sudo service postgresql start
- Type
psqlto open the interactive terminal for working with Postgres - Create a user called fairplay
create user fairplay; - Then do
create database fairplay;to create a database called fairplay alter user fairplay with password 'JmUbR3dUojwuirGk2Kls';alter user fairplay with superuser;- To quit this terminal type
\q. - Unzip the database file
gunzip dbexport.pgsql.gz - Then do
psql -d fairplay -f dbexport.pgsql - Upgrade Django with
sudo pip install --upgrade Django
- Then do
python manage.py createsuperuserto create a new user for logging into the app. - Press the green button and run the app!
- Go to your admin /admin