[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:
parent
1870d50ccf
commit
27c9a3a35b
4 changed files with 39 additions and 1 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue