Odprta koda 2019. Web aplikacija Sensor.
Samo Penic
2019-04-11 fe4f05bd544255b4874ac8e60d2095a7a0b69dd4
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>