Fakultas Ilmu Komputer UI

Commit 0fa3ea75 authored by Izzan Fakhril Islam's avatar Izzan Fakhril Islam
Browse files

implement delete todo on frontend

parent d6d5d0f7
Pipeline #28258 passed with stages
in 20 minutes and 37 seconds
......@@ -52,11 +52,13 @@
<tr>
<th><h5><b>Date/Time</b></h5></th>
<th><h5><b>Todo</b></h5></th>
<th><h5><b>Action</b></h5></th>
</tr>
{% for todos in todos_dict %}
<tr>
<td>{{ todos.date }}</td>
<td>{{ todos.todo_list }}</td>
<td><button class="btn-danger"><a id="id_logout" style="color: white" href="{% url 'tutorial-7:delete_todo' todos.id %}">Delete</a></button></td>
</tr>
{% endfor %}
</table>
......
from django.conf.urls import url
from .views import index, login, logout, add_todo, add_todo_commentary, send_login_email
from .views import index, login, logout, add_todo, add_todo_commentary, send_login_email, delete_todo
urlpatterns = [
url(r'^$', index, name='index'),
......@@ -7,6 +7,7 @@ urlpatterns = [
url(r'add_todo_commentary/$', add_todo_commentary, name='add_todo_commentary'),
url(r'^send_email$', send_login_email, name='send_login_email'),
url(r'^login$', login, name='login'),
url(r'^logout$', logout, name='logout')
url(r'^logout$', logout, name='logout'),
url(r'^(?P<id>[0-9]+)/delete/$', delete_todo, name='delete_todo'),
]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment