Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.

Thedand/project_flask_task

Repository files navigation

Task Manager

Introduction

This is a task manager application, implemented using Flask with both the database (PostgreSQL). It also has user registration and authentication functionalities. It is also available to create, update and delete tasks using the only superuser access flag. You can view the list of users and the number of their tasks with superuser access and users with access flag.

Demo

app

Modify app

Modify database.conf

POSTGRES_USER=postgres #default username
POSTGRES_PASSWORD=1591 #default password
POSTGRES_HOST=localhost #default or your url
POSTGRES_PORT=5432 #default or your port
POSTGRES_DB=db #default or your database

Modify docker-compose.yml

environment:
- POSTGRES_USER=postgres #database.conf
- POSTGRES_PASSWORD=1591 #database.conf
- POSTGRES_HOST=db #database.conf
- POSTGRES_PORT=5432 #database.conf
- POSTGRES_DB=db #database.conf

OR use instead environment

env_file: database.conf

Installations from the terminal

mkdir Projects
cd Projects
git clone https://github.com/Thedand/project_flask_task.git
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Installation docker and docker-compose

Install Docker

Install Docker Compose

Install using terminal

cd project_flask_task

docker-compose up --build frontend usage or build project

While the app and database are being created

Here are the commands to access the application and database

docker exec -it project_flask_task_db_1 psql -U postgres - access in Postgresql

docker exec -it project_flask_task_app_1 bash - access in app use bash

The default user is created with access flags

is_active=True - active, can log in task manager.
is_superuser=True - superuser, can create, edit and delete tasks.
can_review_tasks=True - can_review_tasks, can access to the number of tasks.

you can change these access flags in routes.py -> User Registration

Welcome to page Task Manager

Then simply open up a browser, Chrome/Chromium recommended, to 127.0.0.1:5000 / localhost:5000