init repo

This commit is contained in:
2023-09-16 10:48:47 +02:00
commit bf365b1204
30 changed files with 697 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{% block title %}mumui{% endblock %}</title>
</head>
<body>
<main>
{% if user.is_authenticated or "login" in request.path %}
{% block content %}
{% endblock %}
{% if user.is_authenticated %}
<p><a href="{% url 'logout' %}">log out</a></p>
{% endif %}
{% else %}
<p>You are not logged in</p>
<a href="{% url 'login' %}">log In</a>
{% endif %}
</main>
</body>
</html>
+36
View File
@@ -0,0 +1,36 @@
{% extends 'base.html' %}
{% block title %}deployment's board{% endblock %}
{% block content %}
{{ user.username }}'s board
{% if page_obj %}
<ul>
{% for deployment in page_obj %}
<li><a href="{% url 'deployment-details' deployment.id %}">{{ deployment.name }} | {{ deployment.type }} | {{ deployment.status }}</a></li>
{% endfor %}
</ul>
<div class="pagination">
<span class="step-links">
{% if page_obj.has_previous %}
<a href="?page=1">&laquo; first</a>
<a href="?page={{ page_obj.previous_page_number }}">previous</a>
{% endif %}
<span class="current">
Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}.
</span>
{% if page_obj.has_next %}
<a href="?page={{ page_obj.next_page_number }}">next</a>
<a href="?page={{ page_obj.paginator.num_pages }}">last &raquo;</a>
{% endif %}
</span>
</div>
{% else %}
<p>no deployments available</p>
{% endif %}
<a href="/deployment/create">
<button>create</button>
</a>
{% endblock %}
+12
View File
@@ -0,0 +1,12 @@
{% extends 'base.html' %}
{% block title %}new deployment{% endblock %}
{% block content %}
{{ user.username }}'s new deployment
<form action="" method="post">
{% csrf_token %}
{{ form }}
<input type="submit" value="create">
</form>
{% endblock %}
+24
View File
@@ -0,0 +1,24 @@
{% extends 'base.html' %}
{% block title %}deployment details: {{ deployment.name }}{% endblock %}
{% block content %}
<table>
<tr>
<th>id</th>
<th>name</th>
<th>type</th>
<th>status</th>
</tr>
<tr>
<th>{{ deployment.id }}</th>
<th>{{ deployment.name }}</th>
<th>{{ deployment.type }}</th>
<th>{{ deployment.status }}</th>
</tr>
</table>
<form action="" method="post">
{% csrf_token %}
<input type="submit" value="delete">
</form>
{% endblock %}
+10
View File
@@ -0,0 +1,10 @@
{% extends 'base.html' %}
{% block title %}home{% endblock %}
{% block content %}
Hi {{ user.username }}!
<ul>
<li><a href="{% url 'deployment' %}">deployments</a></li>
</ul>
{% endblock %}
+16
View File
@@ -0,0 +1,16 @@
{% extends 'base.html' %}
{% block title %}login{% endblock %}
{% block content %}
{% if not user.is_authenticated %}
<h2>log in</h2>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">log in</button>
</form>
{% else %}
you're already log in !
{% endif %}
{% endblock %}