From fe4f05bd544255b4874ac8e60d2095a7a0b69dd4 Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Thu, 11 Apr 2019 19:41:14 +0000
Subject: [PATCH] Spremembe narejene na zadnji delavnici.

---
 djsenzor/sensorui/templates/sensorui/index.html |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/djsenzor/sensorui/templates/sensorui/index.html b/djsenzor/sensorui/templates/sensorui/index.html
index 5a64b92..d575c37 100644
--- a/djsenzor/sensorui/templates/sensorui/index.html
+++ b/djsenzor/sensorui/templates/sensorui/index.html
@@ -1,11 +1,24 @@
+{% load static %}
+
 <!DOCTYPE html>
 <html lang="en">
 <head>
     <meta charset="UTF-8">
     <title>Hello world stran</title>
+<script>
+    function myFunction(){
+        var xhttp = new XMLHttpRequest();
+        xhttp.open("GET","my-ajax-test/", true);
+        xhttp.send();
+    }
+
+</script>
+
 </head>
 <body>
 <h1>hello world</h1>
+<img src='{% static "sensorui/muca.jpg" %}'>
+<button onclick="myFunction()">Vzgi lucko</button>
 sin(pi/2)={{ sinpi2 }}
 <hr />
 Zahtevek podal: {{ moje_ime }}
@@ -19,9 +32,9 @@
 </tr>
     {% for row in data_table %}
 <tr>
-  <td>{{ row.sensor_id }}</td>
-  <td>{{ row.data }}</td>
-  <td>{{ row.date }}</td>
+  <td>{{ row.sensor_id.pk }}</td>
+  <td>{{ row.value }}{{ row.sensor_id.sensor_type.unit }}</td>
+  <td>{{ row.timestamp }}</td>
 </tr>
     {% endfor %}
 </table>

--
Gitblit v1.9.3