diff --git a/src/core/templates/core/base.html b/src/core/templates/core/base.html new file mode 100644 index 0000000..1107551 --- /dev/null +++ b/src/core/templates/core/base.html @@ -0,0 +1,64 @@ + + + + + + + + bskydj - {% block title %}home{% endblock %} + + + + + + +
+
+ + bskydj +
+
+ Home + Notifications + Messages +
+
+ + Profile +
+
+ +
+ + + + +
+
+ {% block content %} + {% endblock %} +
+
+ + + +
+ + + + + diff --git a/src/core/templates/core/user_timeline.html b/src/core/templates/core/user_timeline.html index c9adc10..c570f3a 100644 --- a/src/core/templates/core/user_timeline.html +++ b/src/core/templates/core/user_timeline.html @@ -1,7 +1,27 @@ +{% extends "core/base.html" %} + +{% block title %}{{ user }} timeline{% endblock %} + +{% block content %} + {% for publication in publications %} -
-

{{ publication.author_name }} ({{ publication.author_handle }}) {{ publication.published_at }}

-

{{ publication.content }}

- View post +
+
+ Avatar +
+

{{ publication.author_name }}

+

{{ publication.published_at }}

+
+
+

{{ publication.content }}

+
+ + + +
+{% empty %} +

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)