[collector] can now collect Teile and list them

If a newly entered Teil already exists, we ignore that and do nothing.

"name" could become a primary key...
This commit is contained in:
bronsen 2025-03-13 16:32:31 +01:00
parent 1870d50ccf
commit 27c9a3a35b
4 changed files with 39 additions and 1 deletions

View file

@ -1,2 +1,17 @@
<h1>{{ teil.name }}</h1>
Last Changed: {{ teil.modified }}
<hr>
<form action="{% url 'collector:detail' teil.id %}" method="POST">
{% csrf_token %}
<fieldset>
<legend>
<h1>{{ teil.name }}</h1>
</legend>
{% if error_message %}
<p><strong>{{ error_message }}</strong></p>
{% endif %}
</fieldset>
<input type="submit" name="submit" value="enter it!">
</form>

View file

@ -15,3 +15,9 @@
<p>Keine Teile da.</p>
{% endif %}
<form method="POST" action="{% url 'collector:enter' %}">
{% csrf_token %}
<input type="text" name="new_name" value="">
<input type="submit" name="submit" value="add new Teil">
</form>