Indigo is AfricanLII's document management system for managing, capturing and publishing legislation in the Akoma Ntoso format.
It is a Django python web application using:
- Django
- Cobalt -- a lightweight Python library for working with Akoma Ntoso
- Slaw -- a Ruby Gem for generating Akoma Ntoso from PDFs and other documents
- django-rest-framework
- backbone.js
- stickit.js
Read the full documentation at indigo.readthedocs.io.
Clone the repo:
git clone https://github.com/OpenUpSA/indigo.git
cd indigo
Ensure you have python 2.7, virtualenv and pip installed.
Create and activate a virtualenv and install dependencies:
virtualenv env --no-site-packages
source env/bin/activate
pip install -e '.[test]'
Ensure you have PostgreSQL installed and running. Create a postgresql user with username and password indigo
,
and create a corresponding database called indigo
.
sudo su - postgres -c 'createuser -d -P indigo'
sudo su - postgres -c 'createdb indigo'
Check that you can connect to the postgresql database as your regular shell user (not indigo user) by means of password authentication:
psql -h localhost indigo indigo
If you can't connect, you can modify your pg_hba.conf
(/etc/postgresql/9.6/main/pg_hba.conf
for postgresql 9.6) to allow md5 encrypted password authentication for users on localhost by adding a line like this:
local all all md5
Then run migrations to setup the initial database:
python manage.py migrate
python manage.py update_countries_plus
If you have trouble connecting to your database, you may need to change the default database settings in indigo/settings.py
:
db_config = dj_database_url.config(default='postgres://indigo:indigo@localhost:5432/indigo')
Then create the superuser:
python manage.py createsuperuser
Finally, run the server:
python manage.py runserver
You won't be able to import documents yet. First, you'll need to install Ruby and the Slaw parser library. We strongly recommend installing and using RVM or a similar Ruby version manager. You'll need Ruby version 2.3.
Once you've install Ruby, install Bundler and the Indigo dependencies:
gem install bundler
bundle install
You can test that Slaw is installed with slaw --version
:
$ slaw --version
slaw 1.0.0
To run the tests use:
python manage.py test
Read the documentation for details on deploying Indigo.
The project is licensed under a GNU GPL 3 license.
Indigo is Copyright 2015-2017 AfricanLII.