2018-02-03 08:09:23 +00:00
|
|
|
from django.urls import path
|
|
|
|
|
2016-01-07 07:44:57 +00:00
|
|
|
from todo import views
|
2010-09-27 08:48:00 +00:00
|
|
|
|
2018-02-03 08:09:23 +00:00
|
|
|
app_name = 'todo'
|
|
|
|
|
2016-01-07 07:44:57 +00:00
|
|
|
urlpatterns = [
|
2018-02-03 08:09:23 +00:00
|
|
|
path('', views.list_lists, name="lists"),
|
2018-02-04 08:35:04 +00:00
|
|
|
|
|
|
|
# Three paths into `list_detail` view
|
2018-02-10 08:26:19 +00:00
|
|
|
path(
|
|
|
|
'mine/',
|
|
|
|
views.list_detail,
|
|
|
|
{'list_slug': 'mine'},
|
|
|
|
name="mine"),
|
|
|
|
|
|
|
|
path(
|
|
|
|
'<int:list_id>/<str:list_slug>/',
|
|
|
|
views.list_detail,
|
|
|
|
name='list_detail'),
|
|
|
|
|
|
|
|
path(
|
|
|
|
'<int:list_id>/<str:list_slug>/completed/',
|
|
|
|
views.list_detail,
|
|
|
|
{'view_completed': True},
|
|
|
|
name='list_detail_completed'),
|
|
|
|
|
|
|
|
path(
|
|
|
|
'<int:list_id>/<str:list_slug>/delete/',
|
|
|
|
views.del_list,
|
|
|
|
name="del_list"),
|
|
|
|
|
|
|
|
path(
|
|
|
|
'add_list/',
|
|
|
|
views.add_list,
|
|
|
|
name="add_list"),
|
|
|
|
|
|
|
|
path(
|
|
|
|
'task/<int:task_id>/',
|
|
|
|
views.task_detail,
|
|
|
|
name='task_detail'),
|
2018-02-04 08:35:04 +00:00
|
|
|
|
2018-02-10 08:26:19 +00:00
|
|
|
path(
|
|
|
|
'search/',
|
|
|
|
views.search,
|
|
|
|
name="search"),
|
2014-05-31 16:09:27 +00:00
|
|
|
|
2010-09-27 08:48:00 +00:00
|
|
|
# View reorder_tasks is only called by JQuery for drag/drop task ordering
|
2018-02-12 08:04:39 +00:00
|
|
|
# Fix me - this could be an op in the same view, rather than a separate view.
|
2018-02-03 08:09:23 +00:00
|
|
|
path('reorder_tasks/', views.reorder_tasks, name="reorder_tasks"),
|
2010-09-27 08:48:00 +00:00
|
|
|
|
2018-02-12 08:04:39 +00:00
|
|
|
path('ticket/add/', views.external_add, name="external_add"),
|
2018-02-04 08:35:04 +00:00
|
|
|
path('recent/added/', views.list_detail, {'list_slug': 'recent-add'}, name="recently_added"),
|
|
|
|
path('recent/completed/', views.list_detail, {'list_slug': 'recent-complete'}, name="recently_completed"),
|
2016-01-07 07:44:57 +00:00
|
|
|
]
|