Django/templates/posts/index.html

41 lines
753 B
HTML
Raw Normal View History

2019-11-05 15:08:44 +01:00
{% extends 'base.html' %}
{% block title %}
2019-11-19 15:28:55 +01:00
News
2019-11-05 15:08:44 +01:00
{% endblock %}
{% block content %}
2019-12-10 15:21:44 +01:00
<script>
var es = new ReconnectingEventSource('/events/');
es.addEventListener('message', function (e) {console.log(e.data);location.reload();}, false);
2019-11-19 15:28:55 +01:00
2019-11-26 15:30:55 +01:00
2019-12-10 15:21:44 +01:00
</script>
2019-11-26 15:30:55 +01:00
2019-12-10 15:21:44 +01:00
<div class="container">
2019-11-26 15:30:55 +01:00
2019-12-10 15:21:44 +01:00
{% for notice in notices %}
<h3>{{ notice.notice_title }}</h3>
<p>{{ notice.notice_text }}</p>
<p>
<a href="{% url 'delete' deleteId=notice.id %}" class="btn btn-danger">
Meldung loeschen</a></p>
{% endfor %}
2019-11-26 15:30:55 +01:00
2019-12-10 15:21:44 +01:00
<p><a href="{% url 'new' %}" class="btn btn-info" role="button">Neue Nachricht</a></p>
2019-11-26 15:30:55 +01:00
2019-11-19 15:28:55 +01:00
</div>
2019-11-05 15:08:44 +01:00
2019-11-26 15:30:55 +01:00
{% endblock %}