Skip to content

Instantly share code, notes, and snippets.

@johngrantuk
Created March 29, 2016 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johngrantuk/9f80984c4f2e9f369b569f7160a4183e to your computer and use it in GitHub Desktop.
Save johngrantuk/9f80984c4f2e9f369b569f7160a4183e to your computer and use it in GitHub Desktop.
Django Channels Sensor template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{% block title %}Sensor Example{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
{% load staticfiles%}
<div class="section">
<div class="container">
<h1>Sensor Reading</h1>
<p>
<div id="sensor">Sensor Reading: {{ reading }}</div>
</p>
</div>
</div>
<script type="text/javascript" src='{% static "jquery-1.12.1.min.js" %}'></script>
<script type="text/javascript" src='{% static "reconnecting-websocket.min.js" %}'></script>
<script type="text/javascript" src='{% static "sensor.js" %}'></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment