Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% extends "base.html" %}
- {% block content %}
- <h1>Lista tasków</h1>
- <table class="table">
- <thead>
- <tr>
- <th scope="col">Tytuł</th>
- <th scope="col">Termin</th>
- <th scope="col">Wykonano</th>
- <th scope="col">Akcje</th>
- </tr>
- </thead>
- <tbody>
- {% for todo in todos %}
- <tr>
- <td>{{ todo.title }}</td>
- <td>{{ todo.due_date }}</td>
- <td>{{ todo.completed }}</td>
- <td> Akcje</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- {% for field, errors in form.errors.items() %}
- <div class="alert alert-error">
- {{ form[field].label }}: {{ ', '.join(errors) }}
- </div>
- {% endfor %}
- <form method="POST" action="">
- {{ form.hidden_tag() }}
- <div class="mb-3">
- {{ form.title.label(class="form-label") }}
- {{ form.title(class="form-control", placeholder="Wprowadź tytuł zadania") }}
- </div>
- <div class="mb-3">
- {{ form.due_date.label(class="form-label") }}
- {{ form.due_date(class="form-control", placeholder="Wprowadź datę wydarzenia") }}
- </div>
- <div class="mb-3">
- {{ form.completed.label(class="form-label") }}
- {{ form.completed() }}
- </div>
- <div class="mb-3">
- {{ form.submit(class="btn btn-primary") }}
- </div>
- </form>
- {% endblock %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement