Pra. 9
This commit is contained in:
@@ -14,6 +14,16 @@
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
|
||||
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
{% load static %}
|
||||
|
||||
<script src="{% static 'django_eventstream/eventsource.min.js' %}"></script>
|
||||
<script src="{% static 'django_eventstream/reconnecting-eventsource.js' %}"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
{% block navigation %} Platzhalter {% endblock %}
|
||||
|
||||
@@ -6,24 +6,28 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
<script>
|
||||
var es = new ReconnectingEventSource('/events/');
|
||||
es.addEventListener('message', function (e) {console.log(e.data);location.reload();}, false);
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<div class="container">
|
||||
|
||||
{% for notice in notices %}
|
||||
<h3>{{ notice.notice_title }}</h3>
|
||||
<p>{{ notice.notice_text }}</p>
|
||||
<p>{{ notice.notice_text }}</p>
|
||||
<p>
|
||||
<a href="{% url 'delete' deleteId=notice.id %}" class="btn btn-danger">
|
||||
Meldung loeschen</a></p>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
<p><a href="{% url 'new' %}" class="btn btn-info" role="button">Neue Nachricht</a></p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p><a href="{% url 'delete' deleteId=notice.id %}" class="btn btn-danger">
|
||||
Meldung loeschen</a></p>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user