This commit is contained in:
Laura
2019-12-10 15:03:12 +01:00
parent b9dfad7a72
commit 85576f05cc
6 changed files with 49 additions and 2 deletions
+4
View File
@@ -4,6 +4,10 @@
<!DOCTYPE html>
<html lang="de">
<head>
{% load static %}
<script src="{% static 'django_eventstream/eventsource.min.js' %}"></script>
<script src="{% static 'django_eventstream/reconnecting-eventsource.js' %}"></script>
{# <link rel="stylesheet" href="/media/css/style.css" />#}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
+4
View File
@@ -1,6 +1,10 @@
{% extends "base.html" %}
{% block content %}
<script>
var es = new ReconnectingEventSource('/events/');
es.addEventListener('message', function (e) {console.log(e.data);location.reload();}, false);
</script>
<h2>Seite Infos</h2>