Advertisement
Guest User

Untitled

a guest
Aug 20th, 2024
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. <!DOCTYPE html>
  2. {% load static %}
  3.  
  4. <html lang="en">
  5.  
  6. <head>
  7.  
  8. <meta charset="UTF-8" />
  9.  
  10. <title>High and Tidy Cleaning App!</title>
  11.  
  12. <meta name="viewport" content="width=device-width,initial-scale=1" />
  13.  
  14. <meta name="description" content="" />
  15.  
  16. <link rel="icon" href="{% static 'favicon.ico' %}">
  17.  
  18. <link rel="stylesheet" type="text/css" href="{% static 'stylesaddtask.css' %}">
  19.  
  20. </head>
  21.  
  22. <body>
  23.  
  24.  
  25.  
  26. <h2>Add or delete your task!</h2>
  27. <form action="{% url 'crud-redirect' %}" method="post">
  28. {% csrf_token %}
  29. <p>{{ form.name.label_tag }} {{ form.name }}</p>
  30. <p>{{ form.description.label_tag }} {{ form.description }}</p>
  31. <p>{{ form.is_custom.label_tag }} {{ form.is_custom }}</p>
  32. <button type="submit" name="add_task">Add Task!</button>
  33. </form>
  34.  
  35.  
  36. <h2>Existing Tasks:</h2>
  37. <table>
  38. <thead>
  39. <tr>
  40. <th>Name</th>
  41. <th>Description</th>
  42. <th>taskid</th>
  43. <th>is_custom</th>
  44. <th>task_created</th>
  45. <th>Delete task</th>
  46. <th>Update task</th>
  47. </tr>
  48. </thead>
  49. <tbody>
  50. {% for task in tasks %}
  51. <tr>
  52. <td>{{ task.name }}</td>
  53. <td>{{ task.description }}</td>
  54. <td>{{ task.taskid }}</td>
  55. <td>{{ task.is_custom }}</td>
  56. <td>{{ task.task_created }}</td>
  57. <td>
  58. <form action="{% url 'crud-redirect' %}" method="post" style="display: inline;">
  59. {% csrf_token %}
  60. <input type="hidden" name="taskid" value="{{ task.taskid }}">
  61. <button type="submit" name="delete_task">Delete Task!</button></form>
  62. </td>
  63. <td>
  64. <form action="{% url 'temp-update' task.taskid %}" method="post" style="display: inline;">
  65. {% csrf_token %}
  66. <input type="hidden" name="taskid" value="{{ task.taskid }}">
  67. <button type="submit" name="update_task">Update task</button>
  68. </form>
  69. </td>
  70. </tr>
  71. {% endfor %}
  72.  
  73.  
  74.  
  75.  
  76. </form>
  77. </tbody>
  78. </table>
  79.  
  80. </body>
  81.  
  82. </html>
  83.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement