Add link to individual post in index

This commit is contained in:
PV Tejas 2026-03-11 20:27:32 +05:30
parent 89622db6c9
commit 44a49e5aee
2 changed files with 2 additions and 1 deletions

View file

@ -12,7 +12,7 @@
<article class="post"> <article class="post">
<header> <header>
<div> <div>
<h1>{{ post['title'] }}</h1> <h1><a class="action" href="{{ url_for('blog.individual_post', id=post['id']) }}">{{ post['title'] }}</a></h1>
<div class="about">by {{ post['username'] }} on {{ post['created'].strftime('%Y-%m-%d') }}</div> <div class="about">by {{ post['username'] }} on {{ post['created'].strftime('%Y-%m-%d') }}</div>
</div> </div>
{% if g.user['id'] == post['author_id'] %} {% if g.user['id'] == post['author_id'] %}

View file

@ -13,6 +13,7 @@ def test_index(client, auth):
assert b'by test on 2018-01-01' in response.data assert b'by test on 2018-01-01' in response.data
assert b'test\nbody' not in response.data assert b'test\nbody' not in response.data
assert b'href="/1/update"' in response.data assert b'href="/1/update"' in response.data
assert b'href="/1/"' in response.data
def test_firehose(client, auth): def test_firehose(client, auth):
response = client.get('/') response = client.get('/')