Refactor: to properly use DRFs view functions
This commit is contained in:
parent
3d7e25e20c
commit
3657b4423f
3 changed files with 47 additions and 66 deletions
|
@ -1,8 +1,8 @@
|
|||
from django.urls import path
|
||||
|
||||
from api.posts.views import PostView, PostListView
|
||||
from api.posts.views import PostDetailView, PostListView
|
||||
|
||||
urlpatterns = [
|
||||
path("<str:post_id>/", PostView.as_view(), name="post_details"),
|
||||
path("<str:post_id>/", PostDetailView.as_view(), name="post_detail"),
|
||||
path("", PostListView.as_view(), name="post_list"),
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue