Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- {% load static %}
- <html lang="en">
- <head>
- <meta charset="UTF-8" />
- <title>High and Tidy Cleaning App!</title>
- <meta name="viewport" content="width=device-width,initial-scale=1" />
- <meta name="description" content="" />
- <link rel="icon" href="{% static 'favicon.ico' %}">
- <link rel="stylesheet" type="text/css" href="{% static 'stylesaddtask.css' %}">
- </head>
- <body>
- <h2>Add or delete your task!</h2>
- <form action="{% url 'crud-redirect' %}" method="post">
- {% csrf_token %}
- <p>{{ form.name.label_tag }} {{ form.name }}</p>
- <p>{{ form.description.label_tag }} {{ form.description }}</p>
- <p>{{ form.is_custom.label_tag }} {{ form.is_custom }}</p>
- <button type="submit" name="add_task">Add Task!</button>
- </form>
- <h2>Existing Tasks:</h2>
- <table>
- <thead>
- <tr>
- <th>Name</th>
- <th>Description</th>
- <th>taskid</th>
- <th>is_custom</th>
- <th>task_created</th>
- <th>Delete task</th>
- <th>Update task</th>
- </tr>
- </thead>
- <tbody>
- {% for task in tasks %}
- <tr>
- <td>{{ task.name }}</td>
- <td>{{ task.description }}</td>
- <td>{{ task.taskid }}</td>
- <td>{{ task.is_custom }}</td>
- <td>{{ task.task_created }}</td>
- <td>
- <form action="{% url 'crud-redirect' %}" method="post" style="display: inline;">
- {% csrf_token %}
- <input type="hidden" name="taskid" value="{{ task.taskid }}">
- <button type="submit" name="delete_task">Delete Task!</button></form>
- </td>
- <td>
- <form action="{% url 'temp-update' task.taskid %}" method="post" style="display: inline;">
- {% csrf_token %}
- <input type="hidden" name="taskid" value="{{ task.taskid }}">
- <button type="submit" name="update_task">Update task</button>
- </form>
- </td>
- </tr>
- {% endfor %}
- </form>
- </tbody>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement