added loops to index
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
<html>
|
||||
<head>
|
||||
{% if title %}
|
||||
<title>{{ title }} - Microblog</title>
|
||||
{% else %}
|
||||
<title>Welcome to Microblog</title>
|
||||
{% endif %}
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hello, {{ user.username }}!</h1>
|
||||
{% for post in posts %}
|
||||
<div><p>{{ post.author.username }} says: <b>{{ post.body }}</b></p></div>
|
||||
{% endfor %}
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user