2.1. Requirements

OnTask has been developed as a Django application. Django is a high-level, python-based web framework that supports a rich set of functionality typically required in applications like OnTask. As many other web applications, OnTask requires a set of additional libraries for its execution, namely:

  • Redis

  • PostgreSQL (version 9.5 or later)

  • Python 3.7

  • Django 2.2

  • Additional Django modules listed in the file requirements/base.txt

Some of these requirements are handled using pip (Python’s package index application).

2.1.1. Install and Configure Redis

Django requires Redis to execute as a daemon in the same machine to cache information about the sessions. No specific changes are required in the code, simply have the server running in the background.

  1. Download and install redis.

    Follow the instructions to configure it to be used by Django.

  2. Test that it is executing properly in the background (use the ping command in the command line interface.

2.1.2. Install and Configure PostgreSQL

  1. Download and install postgresql.

  2. Create the role ontask with the command createuser. The role should be able to create new databases but not new roles and you should define a password for the user (use createuser --interactive -W).

  3. Adjust the access configuration in postgresql (in the configuration file pg_hba.conf) to allow the newly created user to access databases locally.

  4. Create a new database with name ontask with the createdb command.

  5. Use the client application psql to verify that the user has access the newly created database and can create and delete a new table and run regular queries. Test the connection with the following command:

    psql -h 127.0.0.1 -U ontask -W ontask
    

    If the client does not connect to the database, review your configuration options.

  6. The libraries required by OnTask will install some Python packages compiling the soure and one of them uses the development libraries from PostgreSQL. If you are using a linux distribution, make sure you install the package postgresql-server-dev-all.

2.1.3. Install Python 3

In the following sections we assume that you can open a command line interpreter and you can execute the two python interpreter for version 3.

  1. Install python

  2. Verify that the interpreter can run and has the right version (3) using the command line interpreter (either python --version or python3 --version).

  3. Install pip (the package may be called python3-pip for Python 3). This tool will be used to install additional libraries required to execute OnTask.

  4. Some python libraries will require compiling source code, so make sure the package python3.7-dev is also installed.