Skip to content

Django-based task management system allows users to create, list, update, and delete tasks, with support for bulk adding and deleting. Each task has a title and a completion status.

Notifications You must be signed in to change notification settings

Addy-codes/Py-TaskKeeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task Management System

This Django-based task management system allows users to create, list, update, and delete tasks, with support for bulk adding and deleting. Each task has a title and a completion status.

Features

  • Create a new task: Add tasks with a title and completion status.
  • List all tasks: View all tasks stored in the system.
  • Get a specific task: Retrieve details of a specific task.
  • Delete a task: Remove a task from the system.
  • Edit a task: Update the title and/or completion status of a task.
  • Bulk add tasks: Add multiple tasks in a single request.
  • Bulk delete tasks: Remove multiple tasks in a single request.

Installation

Prerequisites

  • Python 3.6 or higher
  • Django 3.0 or higher
  • Django REST Framework

Setting Up a Virtual Environment

  1. Clone the repository to your local machine.

  2. Navigate to the project directory and create a virtual environment:

    python -m venv venv
  3. Activate the virtual environment:

    • On Windows: venv\Scripts\activate
    • On macOS/Linux: source venv/bin/activate

Installing Dependencies

Install the required packages using pip:

pip install django djangorestframework

Database Migrations

Apply the database migrations to set up your database schema:

python manage.py migrate

Running the Server

Start the Django development server:

python manage.py runserver

The API will be available at http://localhost:8000/.

Usage

Endpoints

  • List/Create Tasks: GET and POST /tasks/
  • Retrieve/Update/Delete Task: GET, PUT, PATCH, and DELETE /tasks/<int:pk>/
  • Bulk Add Tasks: POST /tasks/bulk_add/

image

  • Bulk Delete Tasks: DELETE /tasks/bulk_delete/

image

Examples

  • Adding a New Task:

    curl -X POST http://localhost:8000/tasks/ -H "Content-Type: application/json" -d '{"title": "New Task", "is_completed": false}'
  • Bulk Deleting Tasks:

    curl -X DELETE http://localhost:8000/tasks/bulk_delete/ -H "Content-Type: application/json" -d '{"ids": [1,2,3]}'

About

Django-based task management system allows users to create, list, update, and delete tasks, with support for bulk adding and deleting. Each task has a title and a completion status.

Resources

Stars

Watchers

Forks

Languages