This commit is contained in:
2023-01-31 23:43:08 +01:00
commit 04dbe6c309
25 changed files with 932 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
{% extends "layouts/base.html" %}
{% block content %}
<div x-data="{ results: {},
recipe_id: 1,
ammount:40,
async getResults() {
this.results = await (await fetch('http://localhost:5000/calculate', {
method:'POST',
body: JSON.stringify({
recipe_id: this.recipe_id,
ammount: this.ammount
}),
headers: {
'Content-type': 'application/json; charset=UTF-8',
},
})).json();
console.log(this.results);
}
} ">
{% include "includes/calculate_form.html" %}
{% include "includes/calculate_results.html" %}
</div>
{% endblock content %}