Add messages
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
{% block body %}
|
||||
<h1>Dashboard</h1>
|
||||
{% include "notes/messages.html" %}
|
||||
|
||||
<h2>Notes for you</h2>
|
||||
{% if notes %}
|
||||
|
||||
7
notes/templates/notes/messages.html
Normal file
7
notes/templates/notes/messages.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{% if messages %}
|
||||
<div class="messages">
|
||||
{% for message in messages %}
|
||||
<div class="card">{{ message }}</li>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
{% block body %}
|
||||
<h1>Post a Note</h1>
|
||||
{% include "notes/messages.html" %}
|
||||
<form method="post">{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button type="submit">Post!</button>
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
|
||||
{% block body %}
|
||||
<h1>Profile</h1>
|
||||
{% include "notes/messages.html" %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button type="submit">Post!</button>
|
||||
<button type="submit">Save</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
@@ -6,14 +6,13 @@
|
||||
</div>
|
||||
|
||||
<div class="body">
|
||||
<div class="login">
|
||||
<form action="{% url 'login' %}" method="POST">
|
||||
{% csrf_token %}
|
||||
<h2>Welcome!</h2>
|
||||
<p>Please login to continue</p>
|
||||
{{ form.as_p }}
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
</div>
|
||||
{% include "notes/messages.html" %}
|
||||
<form action="{% url 'login' %}" method="POST">
|
||||
{% csrf_token %}
|
||||
<h2>Welcome!</h2>
|
||||
<p>Please login to continue</p>
|
||||
{{ form.as_p }}
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user