Prak V9; Working on edit

This commit is contained in:
Heimbs
2019-12-10 14:48:03 +01:00
parent 9b3eb7090a
commit 8af5a0bcf2
7 changed files with 91 additions and 6 deletions
+10 -1
View File
@@ -5,6 +5,12 @@ Index
{% endblock %}
{% block content %}
<script>
var es = new ReconnectingEventSource('/events/');
es.addEventListener('message', function (e) {console.log(e.data); location.reload();});
</script>
<div class=container>
<h1 class="display-4">Your Posts</h1>
@@ -13,7 +19,10 @@ Index
<div class="jumbotron">
<h3>{{ notice.notice_title }}</h3>
<p>{{ notice.notice_text }}</p>
<p><a href="{% url 'delete' deleteId=notice.id %}" class="btn btn-danger" role="button">Delete</a></p>
<p>
<a href="{% url 'delete' deleteId=notice.id %}" class="btn btn-danger" role="button">Delete</a>
<a href="{% url 'edit' editId=notice.id %}" class="btn btn-info" role="button">Edit</a>
</p>
{% if message %}
<script>
alert('{{ message }}');