blender-studio/blog/urls.py
2023-05-23 15:03:09 +02:00

21 lines
619 B
Python

from django.urls import path, include
from blog.views.api.comment import comment
from blog.views.api.like import post_like
from blog.views.blog import PostList, PostDetail, PostFeed
urlpatterns = [
path(
'api/posts/<int:post_pk>/',
include(
[
path('comment/', comment, name='api-post-comment'),
path('like/', post_like, name='api-post-like'),
]
),
),
path('', PostList.as_view(), name='post-list'),
path('<slug:slug>/', PostDetail.as_view(), name='post-detail'),
path('latest/feed/', PostFeed(), name='post-feed'),
]