Clean up URLs
This commit is contained in:
parent
fc4fa7b7f3
commit
0c8d31b6af
1 changed files with 38 additions and 8 deletions
46
todo/urls.py
46
todo/urls.py
|
@ -8,18 +8,48 @@ urlpatterns = [
|
||||||
path('', views.list_lists, name="lists"),
|
path('', views.list_lists, name="lists"),
|
||||||
|
|
||||||
# Three paths into `list_detail` view
|
# Three paths into `list_detail` view
|
||||||
path('<int:list_id>/<str:list_slug>/', views.list_detail, name='list_detail'),
|
path(
|
||||||
path('mine/', views.list_detail, {'list_slug': 'mine'}, name="mine"),
|
'mine/',
|
||||||
path('<int:list_id>/<str:list_slug>/completed/', views.list_detail, {'view_completed': True}, name='completed_tasks'),
|
views.list_detail,
|
||||||
|
{'list_slug': 'mine'},
|
||||||
|
name="mine"),
|
||||||
|
|
||||||
path('<int:list_id>/<str:list_slug>/delete/', views.del_list, name="del_list"),
|
path(
|
||||||
path('add_list/', views.add_list, name="add_list"),
|
'<int:list_id>/<str:list_slug>/',
|
||||||
|
views.list_detail,
|
||||||
|
name='list_detail'),
|
||||||
|
|
||||||
path('task/<int:task_id>/', views.task_detail, name='task_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'),
|
||||||
|
|
||||||
# FIXME need both of these?
|
# FIXME need both of these?
|
||||||
path('search-post/', views.search_post, name="search-post"),
|
path(
|
||||||
path('search/', views.search, name="search"),
|
'search-post/',
|
||||||
|
views.search_post,
|
||||||
|
name="search-post"),
|
||||||
|
|
||||||
|
path(
|
||||||
|
'search/',
|
||||||
|
views.search,
|
||||||
|
name="search"),
|
||||||
|
|
||||||
# View reorder_tasks is only called by JQuery for drag/drop task ordering
|
# View reorder_tasks is only called by JQuery for drag/drop task ordering
|
||||||
path('reorder_tasks/', views.reorder_tasks, name="reorder_tasks"),
|
path('reorder_tasks/', views.reorder_tasks, name="reorder_tasks"),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue