Add templates

This commit is contained in:
Andros Fenollosa
2024-11-07 08:17:10 +01:00
parent 19d5317f0d
commit d8ffe60909
8 changed files with 55 additions and 28 deletions

View File

@ -5,13 +5,16 @@
{% block content %}
<h1>Index</h1>
<section
id="form-start-task"
hx-ext="ws"
ws-connect="/ws/nombre_temporal/"
>
<form id="form" ws-send>
<input type="submit" name="task" value="calculate">
</form>
</section>
<script>
document.querySelector('#form-start-task').setAttribute('ws-connect', '/ws/' + localStorage.getItem('userId') + '/');
</script>
<section>
{% if result %}
<h2>The result is {{ result }}</h2>