example-of-crud-in-django-w.../app/library/urls.py

12 lines
305 B
Python
Raw Permalink Normal View History

2021-07-14 16:19:03 +02:00
# 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"),
]