Advertisement
ksieradzinski

Untitled

Feb 28th, 2025
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. {% extends "base.html" %}
  2. {% block content %}
  3. <h1>Lista tasków</h1>
  4. <table class="table">
  5. <thead>
  6. <tr>
  7. <th scope="col">Tytuł</th>
  8. <th scope="col">Termin</th>
  9. <th scope="col">Wykonano</th>
  10. <th scope="col">Akcje</th>
  11. </tr>
  12. </thead>
  13. <tbody>
  14. {% for todo in todos %}
  15. <tr>
  16. <td>{{ todo.title }}</td>
  17. <td>{{ todo.due_date }}</td>
  18. <td>{{ todo.completed }}</td>
  19. <td> Akcje</td>
  20. </tr>
  21. {% endfor %}
  22. </tbody>
  23. </table>
  24. {% for field, errors in form.errors.items() %}
  25. <div class="alert alert-error">
  26. {{ form[field].label }}: {{ ', '.join(errors) }}
  27. </div>
  28. {% endfor %}
  29. <form method="POST" action="">
  30. {{ form.hidden_tag() }}
  31. <div class="mb-3">
  32. {{ form.title.label(class="form-label") }}
  33. {{ form.title(class="form-control", placeholder="Wprowadź tytuł zadania") }}
  34. </div>
  35.  
  36. <div class="mb-3">
  37. {{ form.due_date.label(class="form-label") }}
  38. {{ form.due_date(class="form-control", placeholder="Wprowadź datę wydarzenia") }}
  39. </div>
  40. <div class="mb-3">
  41. {{ form.completed.label(class="form-label") }}
  42. {{ form.completed() }}
  43. </div>
  44.  
  45. <div class="mb-3">
  46. {{ form.submit(class="btn btn-primary") }}
  47. </div>
  48. </form>
  49. {% endblock %}
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement