added flash
This commit is contained in:
@@ -13,6 +13,12 @@
|
||||
<a href="/login">Login</a>
|
||||
</div>
|
||||
<hr>
|
||||
{% with messages = get_flashed_messages() %}
|
||||
{% if messages %}
|
||||
<ul>
|
||||
{% for message in messages %}
|
||||
<li>{{ message }}</li>
|
||||
{% endfor %}
|
||||
{% block content %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
<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>
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<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>
|
||||
</body>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user