added loops to index
This commit is contained in:
@@ -7,7 +7,11 @@
|
||||
{% endif %}
|
||||
</head>
|
||||
<body>
|
||||
<div>Microblog: <a href="/index">Home</a></div>
|
||||
<div>
|
||||
Microblog:
|
||||
<a href="/index">Home</a>
|
||||
<a href="/login">Login</a>
|
||||
</div>
|
||||
<hr>
|
||||
{% block content %}{% endblock %}
|
||||
</body>
|
||||
|
||||
@@ -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