A feature-rich TODO application built with Django REST Framework and PostgreSQL.
- 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
- Backend: Django, Django REST Framework
- Database: PostgreSQL
- Frontend: HTML, CSS, JavaScript, Bootstrap 5
- Authentication: JWT (JSON Web Tokens)
- File Handling: Pillow, PyPDF2
-
Clone the repository:
git clone <repository-url> cd TODOapp -
Install dependencies:
pip install -r requirements.txt -
Configure PostgreSQL:
- Create a database named
todo_db - Update database settings in
todo_drf/todo_project/settings.pyif needed
- Create a database named
-
Run migrations:
cd todo_drf python manage.py migrate -
Create a superuser:
python manage.py createsuperuser -
Run the development server:
python manage.py runserver -
Access the application at http://localhost:8000 (most probably port 8000)
-
Authentication:
POST /api/token/: Obtain JWT tokenPOST /api/token/refresh/: Refresh JWT token
-
Users:
POST /api/users/: Register a new userGET /api/users/: Get user profile
-
Tasks:
GET /api/tasks/: List all tasksPOST /api/tasks/: Create a new taskGET /api/tasks/{id}/: Get a specific taskPUT/PATCH /api/tasks/{id}/: Update a taskDELETE /api/tasks/{id}/: Delete a taskPOST /api/tasks/{id}/reorder/: Reorder a task
-
Task Images:
POST /api/tasks/{id}/images/: Upload an image for a taskDELETE /api/tasks/{id}/images/{image_id}/: Delete an image
-
Task Files:
POST /api/tasks/{id}/files/: Upload a PDF file for a taskDELETE /api/tasks/{id}/files/{file_id}/: Delete a file
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