Rename some views and URLs more logically
This commit is contained in:
parent
c348ea1179
commit
0c42de2ffb
10 changed files with 29 additions and 26 deletions
16
todo/urls.py
16
todo/urls.py
|
@ -6,13 +6,17 @@ app_name = 'todo'
|
|||
|
||||
urlpatterns = [
|
||||
path('', views.list_lists, name="lists"),
|
||||
path('mine/', views.view_list, {'list_slug': 'mine'}, name="mine"),
|
||||
|
||||
# Three paths into `list_detail` view
|
||||
path('<int:list_id>/<str:list_slug>/', views.list_detail, name='list_detail'),
|
||||
path('mine/', views.list_detail, {'list_slug': 'mine'}, name="mine"),
|
||||
path('<int:list_id>/<str:list_slug>/completed/', views.list_detail, {'view_completed': True}, name='completed_tasks'),
|
||||
|
||||
path('<int:list_id>/<str:list_slug>/delete/', views.del_list, name="del_list"),
|
||||
path('task/<int:task_id>', views.view_task, name='task_detail'),
|
||||
path('<int:list_id>/<str:list_slug>', views.view_list, name='incomplete_tasks'),
|
||||
path('<int:list_id>/<str:list_slug>/completed/', views.view_list, {'view_completed': True}, name='completed_tasks'),
|
||||
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?
|
||||
path('search-post/', views.search_post, name="search-post"),
|
||||
path('search/', views.search, name="search"),
|
||||
|
@ -21,6 +25,6 @@ urlpatterns = [
|
|||
path('reorder_tasks/', views.reorder_tasks, name="reorder_tasks"),
|
||||
|
||||
path('ticket/add/', views.external_add, name="external-add"),
|
||||
path('recent/added/', views.view_list, {'list_slug': 'recent-add'}, name="recently_added"),
|
||||
path('recent/completed/', views.view_list, {'list_slug': 'recent-complete'}, name="recently_completed"),
|
||||
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"),
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue