dashboard
dashboard copied to clipboard
Dashboard for The OpenElections Project.
OpenElections Dashboard
OpenElections Dashboard is a clearinghouse for state election data. The Dashboard will feature information about election agencies, sources of certified results, and the status of the project's data gathering operation.
NOTE: THIS REPOSITORY WILL BE DEPRECATED AND REPLACED WITH ONE THAT CONTAINS METADATA FILES
Getting started as a developer
Prerequisites (on Ubuntu 18.04)
$ sudo apt-get install libpq-dev memcached
Setup
Create a virtualenv
$ virtualenv openelections
Jump in and activate
$ cd openelections
$ . bin/activate
Clone the repository and jump in
$ git clone [email protected]:openelections/dashboard.git repo
$ cd repo
Install the python dependencies
$ pip install -r requirements.txt
$ pip install -r requirements-dev.txt
Add the dashboard
directory to your PYTHONPATH
$ export PYTHONPATH=$PYTHONPATH:`pwd`/dashboard
Create a local_settings.py
from the template
$ cp dashboard/config/local_settings.py.tmpl dashboard/config/local_settings.py
Edit the local settings with your database name and secret key
$ vim dashboard/config/local_settings.py
Create the database.
# Here's using the default postgresql backend and database name
$ sudo -u postgres createdb openelections-dashboard
Sync the database and catch up with all the migrations
$ export DJANGO_SETTINGS_MODULE=dashboard.config.dev.settings
$ django-admin.py syncdb
$ django-admin.py migrate hub
Load initial metadata
$ django-admin.py loaddata dashboard/apps/hub/fixtures/initial_metadata.json
Fire up the development server
$ django-admin.py runserver