Internet of Good Things (IoGT) is developed as a public good under a BSD-2 open-source license.
The development uses the Python programming language, building on the Django server-side web framework combined with the Wagtail content management system.
IoGT 2.x requires:
- Wagtail 3.0.3
- Django 3.2
- Python 3.9+
- PostgreSQL (14+), MySQL and SQLite (3.38+) as database backends
The easiest way to get started is to run IoGT using Docker. Make sure you have Docker Desktop installed, or at the very least the Docker Engine and Docker Compose (which are included in Docker Desktop).
Check out the code.
git clone https://github.com/unicef/iogt.git
cd iogt
Create the database. By default, an SQLite database will be created. This will take a few minutes on the first run because the IoGT container image needs to be created from scratch.
docker compose run --rm django python manage.py migrate
Create a superuser account for administration purposes.
docker compose run --rm django python manage.py createsuperuser
Compile .po language files stored in locale/
docker compose run --rm django python manage.py compilemessages
Start the server.
docker compose up -d
Check the logs.
docker compose logs -f
Once running, navigate to http://localhost:8000/ in your browser. Log in to the admin UI at http://localhost:8000/admin/ - use the superuser name and password you created earlier.
Shut everything down.
docker compose down
It is possible to automatically populate the database with example data for a basic test site.
docker compose run --rm django python manage.py create_initial_data
Optionally, create the main menu automatically as well.
docker compose run --rm django python manage.py autopopulate_main_menus
Follow instructions here
Articles can be transferred from other IoGT sites - details.
After adding new strings to the code base that are user-facing (see https://docs.djangoproject.com/en/4.0/topics/i18n/translation/ ), follow the following process:
- Run
./manage.py translation_tracking
- Review and update
common/translation_utils/translation_status.csv
. Strings that only appear in the admin backend don't need to be tagged astranslate
, only those that face users. See here for details. - Rerun
./manage.py translation_tracking
This process updates PO files as necessary and compiles a list of strings that appear in the translation manager in the admin backend.
Remark: The file common/translation_utils/translations.csv
is NOT updated in the process.
Even though it has a column "is in use", its data is currently not updated automatically, and similarly, new strings are not added automatically.
- See here
Page caching is provided by Wagtail Cache and is deactivated by default. To start caching pages, follow the activation intructions.
To use Elasticsearch as a search backend instead of the relational database see the setup instructions.
Follow instructions here
Follow instructions here
Run the following commands:
make tests
make selenium-test
In parallel, for example, with 4 processes:
IOGT_TEST_PARALLEL=4 make test
IOGT_TEST_PARALLEL=4 make selenium-test
More details of the Selenium tests can be found in the Selenium test README.