Home

Awesome

Kartpool

Community driven delivery platform for the ones who need it the most

This repository contains the complete source-code for the blog post:

Thinking of building a contact-tracing application? Here's what you can do instead.

App Screenshot

Instructions to install

  1. Install PostgreSQL and PostGIS I highly recommend a Docker installation:

    Alternatively, you can perform an installation directly on the host operating system:

    • Download the official PostgreSQL installer for your system.
    • Install the PostGIS extension
  2. Install python3.7 and pip3

  3. Install GDAL (Required for Django to interface with PostGIS)

    • sudo apt-get install libpq-dev python-dev
    • sudo apt-get install binutils libproj-dev gdal-bin
  4. Create a python virtual environment using venv python -m venv ~/python-virtual-environments/kartpool

  5. Activate virtual environment source ~/python-virtual-environments/kartpool/bin/activate

  6. Install Django and other dependencies pip install -r requirements.text

Instructions to run

  1. Start PostgreSQL database service If you installed via docker, run docker run --name kartpool-postgis -e POSTGRES_PASSWORD=mysecretpassword -d -p 5432:5432 postgis/postgis

  2. Start Django web server (Make sure the virtual environment is activated) python manage.py runserver

  3. Follow the tutorial!

To write psql queries

  1. SSH into your Postgres docker container: docker exec --user postgres -it kartpool-postgis /bin/bash (Skip this step if you have a native PostgreSQL installation)
  2. Run psql on the terminal

Once you connect to the database, enable the PostGIS extension by typing enable extension postgis

Credits

I've had much help from this excellent tutorial

Have any questions?

Say hi 👋 on: