Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
551 B
0
Indexable
Never
from django.urls import path

from .views import api_posts, api_posts_detail, api_group, api_group_detail, api_comment, api_comment_detail
from rest_framework.authtoken import views

urlpatterns = [
    path('v1/posts/', api_posts),
    path('v1/posts/<int:pk>/', api_posts_detail),
    path('v1/api-token-auth/', views.obtain_auth_token),
    path('v1/groups/', api_group),
    path('v1/groups/<int:pk>/', api_group_detail),
    path('v1/posts/<int:pk>/comments/', api_comment),
    path('v1/posts/<int:pk>/comments/<int:id>/', api_comment_detail)
]