Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Python CSS JavaScript

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.



The RapidSMS WBNigeria project...

Developer Setup


  • A Linux-based development environment including Python 2.6. Ubuntu 10.04 or later is recommended. At present, Windows-based environments are not actively supported.

  • PostgreSQL and the appropriate Python bindings (psycopg2). In Debian-based distributions, you can install these using apt-get, e.g.:

    sudo apt-get install postgresql libpq-dev
  • The following additional build dependencies:

    sudo apt-get install libxslt1-dev libxml2-dev mercurial
  • CouchDB is required for logging and audit tracking purposes. See for more information about CouchDB:

    sudo apt-get install couchdb
  • Jython is required for the Touchforms player:

    sudo java -jar jython_installer-2.5.2.jar
    # Default answers. Target directory /usr/local/lib/jython
    sudo ln -s /usr/local/lib/jython/bin/jython /usr/local/bin/
  • Install pip and virtualenv, and make sure virtualenv is up to date, e.g.:

    easy_install pip
    pip install -U virtualenv
    pip install -U virtualenvwrapper

To setup a local development environment, follow these steps:

  1. Clone the code from Github:

    git clone

  2. Create a Python virtual environment for this project:

    mkvirtualenv --distribute wbnigeria
    workon wbnigeria
  3. Install the project dependencies into the virtual environment:

  4. Update the submodules:

    git submodule init
    git submodule update
  5. Create local settings file and initialize a development database:

    createdb wbnigeria
    ./ syncdb
  6. In a terminal, start the Django development server:

    ./ runserver
  7. In another terminal, start the XForms player:

    cd submodules/touchforms/touchforms/backend/
    jython 4444
  8. Open http://localhost:8000 in your web browser and you should see an Installation Successful! screen.

Bootstrapping Data

python loaddata locations_data.json
python loaddata sites_data.json
python loaddata flat_forms.json
upload xforms in forms/ in 'Decision Tree XForms' tab
python populate_sites
python import_users apps/web_users/fixtures/user_import.sample.csv
python loaddata flatpages.json

Generating Report Data

For testing purposes you can generate random data for the report dashboards:

python generate_fake_reports --all

This will generated 1000 reports per dashboard as defined by the DASHBOARD_SAMPLE_DATA setting. See python help generate_fake_reports for additional options.

Something went wrong with that request. Please try again.