Skip to content

MusfiqDehan/task-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task Manager

A Python-Django Task Manager Project with REST API

Project's Short Demo

Project-Demo.mp4

For more detail overview visit this link: https://youtu.be/4XTaPGTVto0

Table of Contents

Technology Used

  • Frontend: HTML5, CSS3, Bootstrap5, JavaScript
  • Backend: Python=3.11.4, Django=4.2.5
  • Database: PostgreSQL, (Hosted on Render for Production)
  • Static and Media Upload: AWS S3 Bucket using Cloudflare R2
  • API: Django-REST-Framework
  • Version Control: Git, GitHub
  • Editor: VS Code
  • Operating System: Ubuntu 23.04 LTS
  • Browser(Tested On): Google Chrome, Microsoft Edge, Mozilla Firefox

⬆️Go to Table of Contents

How to Run Locally

Clone from GitHub

  • Install Python3
  • Install pip
sudo apt install python3-pip
  • Clone the repository
git clone https://github.com/MusfiqDehan/task-manager.git
  • Go to the project directory
cd task-manager
  • Create a virtual environment
python3 -m venv venv
  • Activate the virtual environment
source venv/bin/activate
  • Install the dependencies
pip3 install -r requirements.txt
  • Run the server
python manage.py runserver
deactivate

⬆️Go to Table of Contents

Setup PostgreSQL Database

  • Install PostgreSQL
sudo apt install postgresql postgresql-contrib
  • Login to PostgreSQL
sudo -u postgres psql
  • Create a database
CREATE DATABASE task_manager;
  • Create a user
CREATE USER task_manager_user WITH PASSWORD 'task_manager_password';
  • Grant privileges to the user
GRANT ALL PRIVILEGES ON DATABASE task_manager TO task_manager_user;
  • Exit from PostgreSQL
\q
  • Open the settings.py file from task_manager directory

  • Create a file named .env in the task_manager directory and add the following lines

SECRET_KEY=your_secret_key
DEBUG=False
DB_ENGINE=django.db.backends.postgresql
DB_NAME=task_manager
DB_USER=task_manager_user
DB_PASSWORD=task_manager_password
DB_HOST=localhost
DB_PORT=5432

See the .env.example file for reference.

⬆️Go to Table of Contents

Import Data from db.json

  • You will find a file named db.json in the root directory

  • Run the following command to import data from db.json

python3 manage.py loaddata db.json
  • Migrate Database
python manage.py makemigrations
python manage.py migrate

⬆️Go to Table of Contents

Admin Panel

  • Run the server
python manage.py runserver
  • Open the browser and go to http://127.0.0.1:8000/

  • To access the admin panel, go to http://127.0.0.1:8000/admin/

  • Login with the following credentials:

    • Username: admin
    • Password: admin
  • If these credentials don't work, you can create a superuser by running the following command:

python manage.py createsuperuser
  • Enter the username, email, and password

  • Now you can access the admin panel with the credentials you have just created

⬆️Go to Table of Contents

API Details

⬆️Go to Table of Contents