boat merge
This commit is contained in:
parent
593b0dcfe6
commit
ecc7552c20
|
@ -124,3 +124,6 @@ class TapForm(Form):
|
|||
"""
|
||||
|
||||
TapFormSet = formset_factory(TapForm)
|
||||
|
||||
class BoatForm(Form):
|
||||
|
||||
|
|
|
@ -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 %}
|
|
@ -0,0 +1,8 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<ul>
|
||||
{% for port in ports.all %}
|
||||
<li>{{ port }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
Loading…
Reference in New Issue