PR9
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user