v0.0.7 | 블로그 기능 개선
Some checks failed
Build And Test / build-and-push (push) Failing after 1m1s

- Post 모델 개선 (author_id, updated_at, view_count 등)
- Tag 모델 및 태그 기능 추가
- 댓글 기능 추가
- API 확장

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-15 00:33:05 +09:00
parent e5acf22246
commit 2cc9472c7a
7 changed files with 360 additions and 39 deletions

View File

@ -1,10 +1,22 @@
# blog/urls.py
from django.urls import path
from .views import PostListView, PostListCreateView, PostDetailView
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import PostListView, PostListCreateView, PostDetailView, CommentViewSet, TagListView
# 댓글 라우터
comment_router = DefaultRouter()
comment_router.register(r'comments', CommentViewSet, basename='comment')
urlpatterns = [
# 태그 관련
path('tags/', TagListView.as_view(), name='tag-list'),
# 포스트 관련
path('posts/', PostListView.as_view(), name='post-list'),
path('create/', PostListCreateView.as_view(), name='post-list-create'),
path('posts/<int:pk>/', PostDetailView.as_view(), name='post-detail'),
# 댓글 관련 (포스트 하위 리소스)
path('posts/<int:post_pk>/', include(comment_router.urls)),
]