Open Data 500
HTML JavaScript CSS Python Shell
Latest commit 3815b9b Dec 19, 2016 @annabialas annabialas banner
Permalink
Failed to load latest commit information.
docs
handlers
static banner Dec 19, 2016
templates
.gitignore ignore .DS_Store Oct 13, 2015
Procfile
README.md
constants.py New Canada files Feb 24, 2016
export.sh
import_csv.py
main.py
models.py
requirements.txt update requirements Oct 2, 2015
runtime.txt
shelldb.py
shelldb.sh
styles.css Styles for Error messages - first design Nov 14, 2013
utils.py fix for Stats.objects.get(country=country) May 21, 2016

README.md

Open Data 500

The code behind the Open Data 500.

Installation

First, fork and clone this repo.

Next, you'll need the Heroku Toolbelt.

In order to run locally, you'll need to pull down the env variables from the Heroku remote (you can obtain the URL for the remote on Heroku's settings page):

git remote add heroku <heroku remote URL>
heroku config --shell > .env

If you don't have access to an existing Heroku deployment, you'll need to configure the following variables in a .env file:

COOKIE_SECRET=
MONGOLAB_URI=
PAPERTRAIL_API_TOKEN=
S3_BUCKET_NAME=
TZ=

To run the server, you'll also need Python 2.7.x. Inside a virtualenv:

pip install -r requirements.txt

Use Foreman to start. The site should be available on port 5000.

Heroku local web

Development

If you make styling changes, you'll need to install the Ruby gem sass.

gem install sass

Then, as you develop, you need to make sure to watch the css directory to re-compile on the fly:

sass --watch static/css