Invera ToDo-List Challenge - Corigliano Lucas #20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Invera ToDo-List Challenge
API REST en Django + DRF para gestionar una lista de tareas con autenticación JWT, filtros, logs, tests y despliegue con Docker.
Funcionalidades
?search=...
)?created_after=YYYY-MM-DD
)Instalación y ejecución
Local (sin Docker)
Con Docker
Requiere Docker y Docker Compose.
.env
:Endpoints principales
Autenticación
POST /api/register/
→ Registro de usuarioPOST /api/login/
→ Obteneraccess
yrefresh
tokensPOST /api/refresh/
→ Renovar tokenaccess
Tareas
GET /api/tasks/
→ Listar tareas propias?search=...
y/o?created_after=YYYY-MM-DD
POST /api/tasks/
→ Crear tareaGET /api/tasks/{id}/
→ Detalle de tareaPUT /api/tasks/{id}/
→ Actualizar tareaDELETE /api/tasks/{id}/
→ Eliminar tareaPUT /api/tasks/{id}/complete/
→ Marcar como completadaEjemplos con
curl
Registro
Login
Crear tarea
Marcar como completada
curl -X PUT http://localhost:8000/api/tasks/1/complete/ -H "Authorization: Bearer <ACCESS_TOKEN>"
Filtrar
Logs
Access logs:
logs/access.log
Middleware
AccessLogMiddleware
registra método, path, status, usuario y duración.Business logs:
logs/app.log
Signals (
tasks/signals.py
) registran:task created
task updated
task completed
task uncompleted
task deleted
Ejemplo access log
Ejemplo business log
Tests
Para correr los tests:
Los tests (
tasks/test.py
) cubren:Diagramas
Secuencia: Request → Middleware → ViewSet/DRF → Signals → Loggers
Componentes
Estructura del proyecto
Notas finales
.env
(ACCESS_TOKEN_DAYS
,REFRESH_TOKEN_DAYS
).