boat merge

This commit is contained in:
docteur_mucus 2019-06-08 13:44:47 +02:00
parent 593b0dcfe6
commit ecc7552c20
5 changed files with 47 additions and 0 deletions

View File

@ -124,3 +124,6 @@ class TapForm(Form):
""" """
TapFormSet = formset_factory(TapForm) TapFormSet = formset_factory(TapForm)
class BoatForm(Form):

View File

@ -0,0 +1,36 @@
{% extends "base.html" %}
{% block content %}
<form action="{% url 'port:add' %}" method="post">
{% csrf_token %}
<fieldset>
<legend>Port</legend>
{{ port_form }}
</fieldset>
<fieldset>
<legend>Dock</legend>
<table>
{% for dock_form in dock_forms %}
{{ dock_form.as_table }}
{% endfor %}
</table>
</fieldset>
<fieldset>
<legend>Plug</legend>
<table>
{% for plug_form in plug_forms %}
{{ plug_form.as_table }}
{% endfor %}
</table>
</fieldset>
<fieldset>
<legend>Tap</legend>
<table>
{% for tap_form in tap_forms %}
{{ tap_form.as_table }}
{% endfor %}
</table>
</fieldset>
<input type="submit" value="add"/>
</form>
{% endblock %}

View File

@ -0,0 +1,8 @@
{% extends "base.html" %}
{% block content %}
<ul>
{% for port in ports.all %}
<li>{{ port }}</li>
{% endfor %}
</ul>
{% endblock %}

0
port/urls/boat.py Normal file
View File

0
port/views/boat.py Normal file
View File