Skip to content

JO-Techs/ToDoListApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TODO App with Django REST Framework and PostgreSQL

A feature-rich TODO application built with Django REST Framework and PostgreSQL.

Features

  • User authentication (login/signup)
  • Create, read, update, and delete tasks
  • Reorder tasks (drag and drop)
  • Add images to tasks
  • Add PDF files to tasks (with compression)
  • Customize background color and theme for each task
  • Set due dates for tasks
  • Mark tasks as completed
  • Dark mode toggle
  • Calendar view for task deadlines
  • Highlight tasks with custom colors

Tech Stack

  • Backend: Django, Django REST Framework
  • Database: PostgreSQL
  • Frontend: HTML, CSS, JavaScript, Bootstrap 5
  • Authentication: JWT (JSON Web Tokens)
  • File Handling: Pillow, PyPDF2

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd TODOapp
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Configure PostgreSQL:

    • Create a database named todo_db
    • Update database settings in todo_drf/todo_project/settings.py if needed
  4. Run migrations:

    cd todo_drf
    python manage.py migrate
    
  5. Create a superuser:

    python manage.py createsuperuser
    
  6. Run the development server:

    python manage.py runserver
    
  7. Access the application at http://localhost:8000 (most probably port 8000)

API Endpoints

  • Authentication:

    • POST /api/token/: Obtain JWT token
    • POST /api/token/refresh/: Refresh JWT token
  • Users:

    • POST /api/users/: Register a new user
    • GET /api/users/: Get user profile
  • Tasks:

    • GET /api/tasks/: List all tasks
    • POST /api/tasks/: Create a new task
    • GET /api/tasks/{id}/: Get a specific task
    • PUT/PATCH /api/tasks/{id}/: Update a task
    • DELETE /api/tasks/{id}/: Delete a task
    • POST /api/tasks/{id}/reorder/: Reorder a task
  • Task Images:

    • POST /api/tasks/{id}/images/: Upload an image for a task
    • DELETE /api/tasks/{id}/images/{image_id}/: Delete an image
  • Task Files:

    • POST /api/tasks/{id}/files/: Upload a PDF file for a task
    • DELETE /api/tasks/{id}/files/{file_id}/: Delete a file

Project Structure

todo_drf/
β”œβ”€β”€ manage.py
β”œβ”€β”€ media/
β”‚   └── uploads/
β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ css/
β”‚   └── js/
β”œβ”€β”€ templates/
β”‚   β”œβ”€β”€ base.html
β”‚   β”œβ”€β”€ home.html
β”‚   └── registration/
β”‚       β”œβ”€β”€ login.html
β”‚       └── register.html
β”œβ”€β”€ todo_app/
β”‚   β”œβ”€β”€ admin.py
β”‚   β”œβ”€β”€ apps.py
β”‚   β”œβ”€β”€ models.py
β”‚   β”œβ”€β”€ permissions.py
β”‚   β”œβ”€β”€ serializers.py
β”‚   β”œβ”€β”€ tests.py
β”‚   β”œβ”€β”€ urls.py
β”‚   β”œβ”€β”€ views.py
β”‚   β”œβ”€β”€ views_auth.py
β”‚   └── views_frontend.py
└── todo_project/
    β”œβ”€β”€ asgi.py
    β”œβ”€β”€ settings.py
    β”œβ”€β”€ urls.py
    └── wsgi.py

About

Simple To Do List Thought

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors