A simple task management REST API built with Django and Django REST Framework.
It allows you to manage tasks, subtasks, and categories with filtering, searching, and statistics.
- CRUD for tasks, subtasks, and categories
- Status tracking and deadlines
- Filtering, ordering, and search
- Built-in task statistics endpoint
- Admin panel
- SQLite by default (MySQL optional)
git clone https://github.com/your-username/your-repo.git
cd task_managerpython -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txtCopy example .env file and replace with your own secret key:
cp .env.example .envExample content:
SECRET_KEY=your-secret-key-here
python manage.py migratepython manage.py runserverVisit: http://127.0.0.1:8000/
| Method | Endpoint | Description |
|---|---|---|
| GET | /tasks/ | List tasks |
| POST | /tasks/ | Create new task |
| GET | /tasks// | Get task by ID |
| PUT | /tasks// | Update task |
| DELETE | /tasks// | Delete task |
| GET | /tasks/statistics/ | Summary statistics |
| GET/POST | /subtasks/ | List or create subtasks |
| GET/PUT/DELETE | /subtasks// | Retrieve, update or delete |
| GET/POST | /categories/ | List or create categories |
| GET | /categories//count_tasks/ | Task count per category |
- Python 3.13+
- Django 5.2.1
- Django REST Framework
- SQLite3 (default)
- dotenv (.env support)
- django-filter
- You can use
pipreqs . --forceto regeneraterequirements.txtbased on actual imports. - The database file
db.sqlite3will be created automatically aftermigrate. If you already have it, place it in the project root. - Admin panel is available at
/admin/(create superuser withpython manage.py createsuperuser).