From fcd0c97097352860003066bc4a808200cce50ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=CC=81scar=20M=2E=20Lage?= Date: Thu, 14 Nov 2024 19:46:25 +0100 Subject: [PATCH] Minor stuff --- src/core/templates/core/user_timeline.html | 7 +++---- src/core/views.py | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/core/templates/core/user_timeline.html b/src/core/templates/core/user_timeline.html index c570f3a..e40ad69 100644 --- a/src/core/templates/core/user_timeline.html +++ b/src/core/templates/core/user_timeline.html @@ -15,13 +15,12 @@

{{ publication.content }}

- - - + +
{% empty %} -

No hay publicaciones para mostrar.

+

No timeline to display.

{% endfor %} {% endblock %} diff --git a/src/core/views.py b/src/core/views.py index 66ebf4d..801e51a 100644 --- a/src/core/views.py +++ b/src/core/views.py @@ -11,11 +11,11 @@ def user_timeline(request, user_id): headers = {'Authorization': f"Bearer {user.access_token}"} timeline_url = f"{user.pds_url}/xrpc/app.bsky.feed.getTimeline" - # Realizamos la solicitud al PDS response = requests.get(timeline_url, headers=headers) if response.status_code != 200: - return JsonResponse({"error": "Failed to retrieve timeline"}, status=500) + error = f"Failed to retrieve timeline: {response.content}" + return JsonResponse({"error": error}, status=500) feed_data = response.json()