View fix (2)

This commit is contained in:
Luciano Gervasoni
2025-08-14 14:12:57 +02:00
parent 015f92a06b
commit 4080154f2b

View File

@@ -116,7 +116,16 @@ def notify_status(request):
}
# POST
response = requests.post(url, params={"chat_id": chat_id, "text": "Hola!"})
response = requests.post(url, params=params)
# print(response.json()) # Check the response
import json
from django.forms.models import model_to_dict
readable = json.dumps(list(urls_data_status), indent=2, default=str)
readable_ = [model_to_dict(obj) for obj in urls_data_status]
response = requests.post(url, params={"chat_id": chat_id, "text": str(readable)})
response = requests.post(url, params={"chat_id": chat_id, "text": str(readable_)})
return HttpResponse( "\n".join([str(e) for e in message]) )