This is just work-in-progress. Switching underlying frameworks...
I wanna go FastAPI.
This commit is contained in:
parent
320591277f
commit
c36a32179a
6 changed files with 153 additions and 6 deletions
|
@ -1,3 +1,14 @@
|
|||
<html>
|
||||
<h1>Pools'n'Pumps Device</h1>
|
||||
<h1>Pools'n'Pumps Device</h1>
|
||||
{% if not relays %}
|
||||
<h2>No relays found.</h2>
|
||||
{% else %}
|
||||
<h2>Relays</h2>
|
||||
<ul>
|
||||
{% for relay in relays %}
|
||||
<li>{{ relay.name }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<a href="/relay/create">Create Relay</a>
|
||||
</html>
|
||||
|
|
12
templates/relay-create.template.html
Normal file
12
templates/relay-create.template.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<html>
|
||||
<h1>Relay Creation</h1>
|
||||
<form method="POST" action="/relay/create">
|
||||
<input type="text" name="name" placeholder="Pool Pump 1"></input>
|
||||
<select name="chip-and-number">
|
||||
{% for pin in pins %}
|
||||
<option value="{{ pin.chip }}-{{ pin.number }}">{{ pin.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<button type="submit">Create</button>
|
||||
</form>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue