Fakultas Ilmu Komputer UI

Commit e3be4d4b authored by Izzan Fakhril Islam's avatar Izzan Fakhril Islam
Browse files

implement delete todo commentary on frontend and urls

parent 0fa3ea75
Pipeline #28273 passed with stages
in 23 minutes and 31 seconds
......@@ -69,11 +69,13 @@
<tr>
<th><h5><b>Date</b></h5></th>
<th><h5><b>Comment</b></h5></th>
<th><h5><b>Action</b></h5></th>
</tr>
{% for commentary in todos_commentary_dict %}
<tr>
<td>{{ commentary.date }}</td>
<td>{{ commentary.comment }}</td>
<td><button class="btn-danger"><a id="id_logout" style="color: white" href="{% url 'tutorial-7:delete_todo_commentary' commentary.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, delete_todo
from .views import index, login, logout, add_todo, add_todo_commentary, send_login_email, delete_todo, delete_todo_commentary
urlpatterns = [
url(r'^$', index, name='index'),
......@@ -8,6 +8,6 @@ urlpatterns = [
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'^(?P<id>[0-9]+)/delete/$', delete_todo, name='delete_todo'),
url(r'^(?P<id>[0-9]+)/delete_todo/$', delete_todo, name='delete_todo'),
url(r'^(?P<id>[0-9]+)/delete_todo_commentary/$', delete_todo_commentary, name='delete_todo_commentary'),
]
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