diff --git a/tienda/api.py b/tienda/api.py index 03155af..27f43dc 100644 --- a/tienda/api.py +++ b/tienda/api.py @@ -9,4 +9,4 @@ def hola(request): @api.get("/products") def products(request): productos = Product.objects.all() - return [dict(producto) for producto in productos] \ No newline at end of file + return [producto.to_dict() for producto in productos] \ No newline at end of file