Odprta koda 2019. Web aplikacija Sensor.
Samo Penic
2019-04-11 fe4f05bd544255b4874ac8e60d2095a7a0b69dd4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{% 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 }}
<br />
 
<table>
<tr>
  <th>Senzor ID</th>
  <th>Podatek</th>
  <th>Datum</th>
</tr>
    {% for row in data_table %}
<tr>
  <td>{{ row.sensor_id.pk }}</td>
  <td>{{ row.value }}{{ row.sensor_id.sensor_type.unit }}</td>
  <td>{{ row.timestamp }}</td>
</tr>
    {% endfor %}
</table>
 
 
</body>
</html>