Git Product home page Git Product logo

py-taskkeeper's Introduction

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]}'

py-taskkeeper's People

Contributors

addy-codes avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.