From 44a49e5aeefff4ad29134ecf0b34e24b6e04cb67 Mon Sep 17 00:00:00 2001 From: PV Tejas Date: Wed, 11 Mar 2026 20:27:32 +0530 Subject: [PATCH] Add link to individual post in index --- flaskr/templates/blog/index.html | 2 +- tests/test_blog.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/flaskr/templates/blog/index.html b/flaskr/templates/blog/index.html index 7f1e4e8..f50de7f 100644 --- a/flaskr/templates/blog/index.html +++ b/flaskr/templates/blog/index.html @@ -12,7 +12,7 @@
-

{{ post['title'] }}

+

{{ post['title'] }}

by {{ post['username'] }} on {{ post['created'].strftime('%Y-%m-%d') }}
{% if g.user['id'] == post['author_id'] %} diff --git a/tests/test_blog.py b/tests/test_blog.py index 7249e1b..548363a 100644 --- a/tests/test_blog.py +++ b/tests/test_blog.py @@ -13,6 +13,7 @@ def test_index(client, auth): assert b'by test on 2018-01-01' in response.data assert b'test\nbody' not in response.data assert b'href="/1/update"' in response.data + assert b'href="/1/"' in response.data def test_firehose(client, auth): response = client.get('/')