Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 1.39 KB

README-WENI.md

File metadata and controls

50 lines (37 loc) · 1.39 KB

U-Report

Build Status codecov

This is the U-Report dashboard built on data collected by RapidPro.

Built for UNICEF by Nyaruka - http://nyaruka.com

Getting Started

Install dependencies

$ curl -sSL https://install.python-poetry.org | python3 - --version 1.6.1
$ poetry install --no-root
$ poetry shell
$ sudo apt-get install gettext

Create a settings file (you'll need to create the postgres db first, username: 'ureport' password: 'nyaruka')

$ cp ureport/settings.py.postgres ureport/settings.py

Sync the database, add all our models and create our superuser

$ sudo service postgresql start

$ sudo -u postgres psql

CREATE USER ureport WITH PASSWORD 'nyaruka';
CREATE DATABASE ureport;
GRANT ALL PRIVILEGES ON DATABASE ureport TO ureport;
\q
$ python manage.py migrate
$ python manage.py createsuperuser
$ python manage.py collectstatic

At this point everything should be good to go, you can start with:

$ python manage.py runserver

Note that the endpoint called for API calls is by default 'localhost:8001', you can uncomment the RAPIDPRO_API line in settings.py.postgres to go against production servers.