Implemented basic models

This commit is contained in:
Jurn Wubben 2025-05-19 22:47:45 +02:00
parent 6bceef1664
commit 3ba6099976
16 changed files with 257 additions and 24 deletions

69
app/templates/edit.html Normal file
View file

@ -0,0 +1,69 @@
{% set cpath = url_for("edit", id=wishlist.editId) %}
<h1>Change name</h1>
<form action="{{ cpath }}" method="POST">
{{ form_wl_editinfo.hidden_tag() }}
{{ form_wl_editinfo.title.label }}
{{ form_wl_editinfo.title() }}
{{ form_wl_editinfo.description.label }}
{{ form_wl_editinfo.description() }}
{{ form_wl_editinfo.wl_edit_submit() }}
</form>
<h1>Reset urls</h1>
<ul>
<li>
View: {{ wishlist.viewId }}
</li>
<li>
Edit: {{ wishlist.editId }}
</li>
</ul>
<form action="{{ cpath }}" method="POST">
{{ form_wl_reseturls.hidden_tag() }}
{{ form_wl_reseturls.wl_reset_submit() }}
</form>
<br>
<h1>Delete wishlist</h1>
<form action="{{ cpath }}" method="POST">
{{ form_wl_delete.hidden_tag() }}
{{ form_wl_delete.wl_del_submit() }}
</form>
<br>
<h1>New item</h1>
<form action="{{ cpath }}" method="POST">
{{ form_it_new.hidden_tag() }}
{{ form_it_new.title.label }}
{{ form_it_new.title() }}
{{ form_it_new.description.label }}
{{ form_it_new.description() }}
{{ form_it_new.price.label }}
{{ form_it_new.price() }}
{{ form_it_new.it_new_submit() }}
</form>
<br>
<h1>Delete items</h1>
<ul>
{% for value in wishlist.items %}
<li>
<form action="{{ cpath }}" method="POST">
{{ form_it_delete.hidden_tag() }}
{{ form_it_delete.index(value=loop.index) }}
{{ form_it_delete.it_del_submit() }}
</form>
{{ value.title }}
</li>
{% endfor %}
</ul>