Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Build Status Codacy Badge Coverage Status


Election results data entry and verification software built by Ona Systems and commissioned by the Libyan High National Elections Commission and the United Nations Development Program.

Quick install

Checkout the repos

git clone

Make a virtual environment and install requirements

Prerequisites: this assumes you have virtualenvwrapper and PostgreSQL installed.

mkvirtualenv tally --python=python3.6.5
pip install -r requirements/dev.pip

Quick start with user demo data

This will remove all data in the database.

To create the database, load demo users, and start the server all in one, run


If you've aleady setup the server, you can start the server with

python runserver

Loading tally demo data

TODO: add some demo result forms and candidate lists

Advanced: recreate the database, then load the data and demo users

This will remove all data in the database.

This will only work if you have data files in the folder ./data

The first argument is the database user, the second is the database host IP address, and the third is the settings file. Modify these arguments as needed.

./scripts/reload_all postgres tally_ho.settings.common

Docker Install

If you already have Docker and docker-compose installed on your machine you can quickly have a demo up by changing into the checked out code directory and running:

docker-compose build
docker-compose up

You can now visit the site at

If you want to use Docker to run the site in production you will need to:

  1. modify the docker-compose.yml file to change the NGINX listening port from 8000 to 80,
  2. add the host you are running the site on to a new ALLOWED_HOSTS list in the tally_ho/settings/ file.

Running Tests

Pass the -s option if you want to use ipdb.set_trace() to debug during a test.


Generating Model Graphs

The below assumes you have pip installed requirements/dev.pip.

Generate model graph for all models:

python graph_models --pydot -a -g -o tally-ho-all-models.png

Generate model graph for app models:

python graph_models --pydot -a -X GroupObjectPermission,UserObjectPermission,GroupObjectPermissionBase,BaseGenericObjectPermission,UserObjectPermissionBase,BaseObjectPermission,Version,Revision,Pageview,Visitor,Session,AbstractBaseSession,Site,LogEntry,User,Group,AbstractUser,Permission,ContentType,AbstractBaseUser,PermissionsMixin,BaseModel -g -o tally-ho-app-models.png

Demo Users

The create_demo_users command will create demo users for each role with usernames like super_administrator, and password data.

File Uploads

The MAX_FILE_UPLOAD_SIZE variable in tally_ho/settings/ file defines the file upload limit which is currently set to 10MB.


You can’t perform that action at this time.