Web app for crowdsourcing preferences about index weighting such as the Human Development Index. Powers YourTopia site - Global Development beyond GDP.
Install Python and pip
Install the requirements into a virtualenv:
virtualenv ~/venv-yourtopia pip install -e .
Run the web application:
python yourtopia/web.py
If you want to modify the default settings:
Copy and paste settings_local.py.tmpl
Add or amend settings (see instructions in the file)
Note that you will need to install the Heroku toolbelt to carry out the heroku
commands below. In addition, you will need a Heroku account. Third, you need the git command-line client.
Skip this step if the application is already deployed
This is heavily based on this tutorial.
heroku create italia-yourtopia
# you may want a larger db (dev is 20k rows)
heroku addons:add heroku-postgresql:dev
heroku config:set YOURTOPIA_SETTINGS=/app/heroku_settings.py
git push heroku master
heroku ps:scale web=1
To have your db working correctly you may need to work out the right db to connect to e.g.:
heroku pg:info
# find the db name available to you
heroku pg:promote {db-name}
Note: if you didn't do the create yourself you will need to add the heroku remote once, using this command:
git remote add heroku git@heroku.com:italia-yourtopia.git
Then push the git repository content to heroku:
git push heroku master
This will also restart the application on the server.
heroku sharing:add joe@example.com
Do the following:
heroku domains:add {your-domain-name}
Now CNAME your domain to {myapp}.herokuapp.com
Use Fabric and the fabfile:
fab deploy:{service-name}[,{port}] --host ... --user ...
This can be used for both initial deployment and upgrades.