example-of-crud-in-django-w.../app/library/urls.py
2021-07-14 16:19:03 +02:00

12 lines
305 B
Python

# app/Library/urls.py
from django.urls import path
from app.library.views import ping, BookList, BookDetails
urlpatterns = [
path("ping/", ping, name="ping"),
path("api/book/", BookList.as_view(), name="book_list"),
path("api/book/<int:pk>/", BookDetails.as_view(), name="book_details"),
]