Skip to content
The Django source code for the website.
Python HTML CSS Other
Find file
Failed to load latest commit information.
analysis new vote comparison command line tool
bill tweak explanations of conference report statuses
build drop django_extensions module, not sure if we ever used it for anything
committee make Committee.code uniquely indexe, allows filtering in the api
conf disable piwik, it's been nothing but trouble, and maybe a part of my …
events include user IDs in email update reply links
ext drop state-legislative tracking things - it's been disabled for a whi…
lib move django-html-emailer, django-lorien-common from submodules to pip…
parser drop state-legislative tracking things - it's been disabled for a whi…
person show fewer subject areas that a MoC sponsors bills in, smartly
poll_and_call dumping the pollandcall call data to a csv file, anonymized, for rese…
predictionmarket more Django 1.7
redirect s/django.conf.urls.defaults/django.conf.urls/g
smartsearch solr facets come back as strings when they are long multivalue?
static remove the mySociety survey script from last summer
templates add tweet/facebook share buttons to bill summary pages
twostream Bootstrap 3.3.0, jQuery 1.11.1, drop, update static/lib…
vote truncate bill summaries that appear on vote pages
website add tweet/facebook share buttons to bill summary pages
whipturk more public whip fixes
.gitignore Changes to make project work on OS X
.gitmodules drop state-legislative tracking things - it's been disabled for a whi… document how to use a Xapian search backend during debugging lots of cool more work on the site
civic.json add civic.json
load_state_data clean up files in the root dir make 'prctl' library optional
minify switch from yuicompressor to rcssmin because yuicompressor doesn't wo… Updated percent_yes implementation based on pull_request feedback 2015 session stats
script update my hashbang wrapper to handle command line arguments with spaces add TEST_RUNNER setting to silence 1_6.W001 warning use SITE_ROOT_URL in more places instead of typing out… drop state-legislative tracking things - it's been disabled for a whi… link to vote pages from the bill status row; explain when there's no … better uwsgi process manager daemonization for uwsgi

GovTrack website frontend

This repo contains the source code of the front-end for The data-gathering scripts are elsewhere.

Installation runs on Ubuntu 12.10 or OS X

  • Install dependencies via OS package manager:

    apt-get install git python-virtualenv python-lxml python-openid python-oauth2 \
        python-iso8601 python-numpy python-scipy python-prctl

    or for OS X (xCode required)

    export CFLAGS=-I/Applications/
    pip install virtualenv lxml python-openid python-oauth2 \
        iso-8601 numpy scipy
  • Clone the source code. Besides this project, you'll also need @unitedstates/congress-legislators which is where legislator and committee information come from.

    git clone   
    git clone --recursive
  • Change directory to the source code root:

    cd ./
  • (OS X only) Install bcrypt

  • Run the build script to install additional dependencies into a virtual environment:

  • Create a local settings file based on the example file:

  • Edit to set up your database. The default configuration uses SQLite as the database and no database configuration is required. Fill in SECRET_KEY though. Here's how you can generate a SECRET_KEY:

    ./ generate_secret_key
  • To enable search (for which complete instructions haven't been provided, so really skip this):

    • For debugging, install Xapian:

      apt-get install python-xapian

        'person': {
            'ENGINE': 'xapian_backend.XapianEngine',
            'PATH': os.path.join(os.path.dirname(__file__), 'xapian_index_person'),
        'bill': {
            'ENGINE': 'xapian_backend.XapianEngine',
            'PATH': os.path.join(os.path.dirname(__file__), 'xapian_index_bill'),
    • For production, install Solr:

      apt-get install openjdk-7-jre jetty
    • Follow the instructions at:

    • Symlink ./bill/solr_schema.xml to ./solr/conf/schema.xml.

  • Initialize the database and minify some files:

    ./ migrate
  • Load some data:

    ./ loaddata django-fixture-people.json
    ./ loaddata django-fixture-usc_sections.json
    ./ loaddata django-fixture-billterms.json
    ./ person
    ./ committee # fails b/c meeting data not available
  • If you set up search indexing, update the index of people:

    ./ update_index -u person person
  • Load bills and votes data:

    ./ bill --congress=114 --disable-index --disable-events
    ./ vote --congress=114 --disable-index --disable-events

If you configured Solr, you can remove --disable-index. For the sake of speed, --disable-events will skip the creation of the events table for bills, which is the basis for feeds and tracking, so that will be nonfunctional.

  • Check the site works by running the development server and visiting the URL specified by the runserver process.

    ./ runserver
  • To update the data in the future, first git-pull the congress-legislators repo to get the latest legislator information. Then:

    ./ person
    ./ committee --congress=113
    ./ bill --congress=113
    ./ vote --congress=113
Something went wrong with that request. Please try again.