Collect, Analyze and Share Data!
Ona is derived from the excellent formhub platform developed by the Sustainable Engineering Lab at Columbia University.
See the installation documentation.
Install Docker and Docker Compose.
docker-compose up
# create super user
# -----------------
docker compose exec api bash
python manage.py createsuperuserIt should be accessible via http://localhost:8000. The settings are in onadata/settings/docker.py.
On registration check the console for the activation links, the default email
backend is django.core.mail.backends.console.EmailBackend. See
Django Docs for details.
If you would like to contribute code please read Contributing Code to Ona Data.
Security Acknowledgments
We would like to thank the following security researchers for responsibly disclosing security issues:
| Name | Date | Severity | Contribution | 
|---|---|---|---|
| Danish Tariq | 1st April 2018 | Medium | Users able to create projects in other user accounts | 
To generate a locale from scratch (ex. Spanish)
django-admin.py makemessages -l es -e py,html,email,txt ;
for app in {main,viewer} ; do cd onadata/apps/${app} && django-admin.py makemessages -d djangojs -l es && cd - ; doneTo update PO files
django-admin.py makemessages -a ;
for app in {main,viewer} ; do cd onadata/apps/${app} && django-admin.py makemessages -d djangojs -a && cd - ; doneTo compile MO files and update live translations
django-admin.py compilemessages ;
for app in {main,viewer} ; do cd onadata/apps/${app} && django-admin.py compilemessages && cd - ; doneGenerate the API documentation and serve via Django using:
cd docs
make html
python manage.py collectstaticGenerate sphinx docs for new code using autodoc.
Run sphinx in autobuild mode using:
sphinx-autobuild docs docs/_build/htmlRequires sphinx-autobuild, install with pip install sphinx-autobuild.
- $ pip install django-debug-toolbar
 - Use/see onadata/settings/debug_toolbar_settings/py
 - Access api endpoint on the browser and use .debug as the format extension e.g /api/v1/projects.debug
 
Requirements
- Postgres 9.4 or higher
 - xcode-select version 2343 or higher
 
Upgrading from a pervious Ona setup Ensure you upgrade all your pip requirements using the following command:
pip install -r requirements/base.pipFake initial migration of guardian, django_digest, registration. Migrate contenttypes app first.
python manage.py migrate contenttypes
python manage.py migrate --fake-initial django_digest
python manage.py migrate --fake-initial guardian
python manage.py migrate --fake-initial registration
python manage.py migrateMajor django changes affecting Ona * The DATABASES settings key depricates the use of the autocommit setting in the OPTIONS dictionary.