Add base template
This commit is contained in:
parent
fbff835598
commit
60b73d8546
3 changed files with 28 additions and 2 deletions
16
nummi/main/templates/main/base.html
Normal file
16
nummi/main/templates/main/base.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
|
||||
<title>{% block title %}Nummi{% endblock %}</title>
|
||||
|
||||
{% block link %}
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
{% block body %}
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
|
@ -1,3 +1,8 @@
|
|||
{% extends "main/base.html" %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Nummi</h1>
|
||||
|
||||
<a href="{% url 'transaction' %}">Add transaction</a>
|
||||
|
||||
{% if transactions %}
|
||||
|
@ -7,3 +12,4 @@
|
|||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
{% extends "main/base.html" %}
|
||||
|
||||
{% block body %}
|
||||
<a href="{% url 'index' %}">Home</a>
|
||||
|
||||
<h1>{{ transaction }}</h1>
|
||||
<form action="{% url 'update_transaction' transaction.id %}" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form }}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" />
|
||||
</form>
|
||||
|
||||
|
@ -16,6 +19,7 @@
|
|||
<a href="{% url 'del_invoice' transaction.id inv.id %}">x</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
<li>{{ invoice_form }}<input type="submit" /></li>
|
||||
<li>{{ invoice_form.as_p }}<input type="submit" /></li>
|
||||
</ul>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue