-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathurls.py
More file actions
19 lines (17 loc) · 635 Bytes
/
Copy pathurls.py
File metadata and controls
19 lines (17 loc) · 635 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from django.conf.urls import url
from django.urls import include, path
from django.contrib import admin
from .views import (
PostListAPIView,
PostCreateAPIView,
PostDetailAPIView,
PostUpdateAPIView,
PostDeleteAPIView
)
urlpatterns = [
path('', PostListAPIView.as_view(), name='post-list'),
path('create/', PostCreateAPIView.as_view(), name='post-create'),
path('<int:pk>/', PostDetailAPIView.as_view(), name='post-detail'),
path('<int:pk>/edit/', PostUpdateAPIView.as_view(), name='post-update'),
path('<int:pk>/delete/', PostDeleteAPIView.as_view(), name='post-delete'),
]