Add: post endpoints for singel post py user, source_site
This commit is contained in:
parent
91e7ea2e81
commit
e02935eac8
2 changed files with 80 additions and 6 deletions
|
@ -1,8 +1,30 @@
|
|||
from django.urls import path
|
||||
|
||||
from api.posts.views import PostDetailView, PostListView
|
||||
from api.posts.views import (
|
||||
PostDetailView,
|
||||
PostDetailSiteCreatorView,
|
||||
PostListView,
|
||||
PostListSourceView,
|
||||
PostListSourceCreatorView,
|
||||
PostListSourceCategoryView,
|
||||
)
|
||||
|
||||
urlpatterns = [
|
||||
path("<str:post_id>/", PostDetailView.as_view(), name="post_detail"),
|
||||
path(
|
||||
"<str:source_site>/<str:creator_slug_or_id>/<str:post_id>/",
|
||||
PostDetailSiteCreatorView.as_view(),
|
||||
name="post_detail_with_site_creator",
|
||||
),
|
||||
path("", PostListView.as_view(), name="post_list"),
|
||||
path("<str:source_site>/", PostListSourceView.as_view(), name="post_list_source"),
|
||||
path(
|
||||
"<str:source_site>/<str:creator_slug_or_id>/",
|
||||
PostListSourceCreatorView.as_view(),
|
||||
name="post_list_source_creator",
|
||||
),
|
||||
path(
|
||||
"<str:source_site>/<str:creator_slug_or_id>/<str:category>",
|
||||
PostListSourceCategoryView.as_view(),
|
||||
name="post_list_source_creator_category",
|
||||
),
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue