11 lines
345 B
Python
11 lines
345 B
Python
# blog/urls.py
|
|
|
|
from django.urls import path
|
|
from .views import PostListView, PostListCreateView, PostDetailView
|
|
|
|
urlpatterns = [
|
|
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'),
|
|
]
|