Add logic to swap the form with the task via htmx.
This commit is contained in:
@@ -4,7 +4,11 @@
|
||||
{% block content %}
|
||||
<h1 class="text-3xl font-bold text-center my-2">Tasks</h1>
|
||||
|
||||
<div class="flex flex-col">
|
||||
<button type="button" hx-get="{% url 'tasks:create-task-form' %}" hx-target="#task-items" hx-swap="beforeend">
|
||||
Add a new task
|
||||
</button>
|
||||
|
||||
<div id="task-items" class="flex flex-col">
|
||||
{% for task in tasks %}
|
||||
{% include "partials/task_item.html" %}
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user