from django.urls import path 
from .views import TaskList, TaskDetail

#urls cant use classes so we must use the function as_view 
urlpatterns = [
    path('',TaskList.as_view(),name ='tasks'),
    #view looks for the primary key in paths 'pk'
    path('task/<int:pk>/',TaskDetail.as_view(),name ='task'),
]

0a63d7e2b0e23210d28632b0bb5533a29f766047
<mask token>

<mask token>
urlpatterns = [path('', TaskList.as_view(), name='tasks'), path(
    'task/<int:pk>/', TaskDetail.as_view(), name='task')]

from django.urls import path
from .views import TaskList, TaskDetail
urlpatterns = [path('', TaskList.as_view(), name='tasks'), path(
    'task/<int:pk>/', TaskDetail.as_view(), name='task')]

from django.urls import path 
from .views import TaskList, TaskDetail

#urls cant use classes so we must use the function as_view 
urlpatterns = [
    path('',TaskList.as_view(),name ='tasks'),
    #view looks for the primary key in paths 'pk'
    path('task/<int:pk>/',TaskDetail.as_view(),name ='task'),
]
