30 lines
970 B
Python
30 lines
970 B
Python
from django.urls import path
|
|
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",
|
|
),
|
|
]
|