{{ publication.author_name }} ({{ publication.author_handle }}) {{ publication.published_at }}
-{{ publication.content }}
- View post +
+
+{% empty %}
+
+
+
+
+
+ {{ publication.author_name }}
+{{ publication.published_at }}
+{{ publication.content }}
+
+
+
+
+
No hay publicaciones para mostrar.
{% endfor %} + +{% endblock %} diff --git a/src/core/views.py b/src/core/views.py index 4574267..66ebf4d 100644 --- a/src/core/views.py +++ b/src/core/views.py @@ -52,7 +52,9 @@ def user_timeline(request, user_id): publication.save() publications = PublicationCache.objects.filter(user=user).order_by('-published_at') - return render(request, 'core/user_timeline.html', {'publications': publications}) + return render(request, 'core/user_timeline.html', + {'publications':publications, + 'user':user}) except User.DoesNotExist: return JsonResponse({"error": "User not found"}, status=404)