from django.urls import path from ebooks.api.views import EbookListCreateAPIView, EbookDetailAPIView, ReviewCreateAPIView, ReviewDetailAPIView urlpatterns = [ path("ebooks/", EbookListCreateAPIView.as_view(), name="ebook-list"), path("ebooks/<int:pk>/", EbookDetailAPIView.as_view(), name="ebook-detail"), path("ebooks/<int:ebook_pk>/review/", ReviewCreateAPIView.as_view(), name="ebook-review"), path("review/<int:pk>", ReviewDetailAPIView.as_view(), name="review-detail") ]
from django.urls import path from ebooks.api.views import (EbookListCreateAPIView, EbookDetailAPIView, ReviewCreateAPIView, ReviewDetailAPIView) # from ebooks.api.views import EbookAPIView urlpatterns = [ path('ebooks/', EbookListCreateAPIView.as_view(), name='ebook-list'), path('ebooks/<int:pk>/', EbookDetailAPIView.as_view(), name='ebook-detail'), # `ebook_pk` is from perform_create method on CreateAPIView: path('ebooks/<int:ebook_pk>/review/', ReviewCreateAPIView.as_view(), name='ebook-review'), path('reviews/<int:pk>', ReviewDetailAPIView.as_view(), name='review-detail'), ]
from django.urls import path from ebooks.api.views import (EbookListCreateAPIView, EbookDetailAPIView, ReviewCreateAPIView, ReviewDetailAPIView) urlpatterns = [ path('ebooks/', EbookListCreateAPIView.as_view(), name='ebook-list'), path('ebooks/<int:pk>/', EbookDetailAPIView.as_view(), name='ebook-detail'), path('ebooks/<int:ebook_pk>/review/', ReviewCreateAPIView.as_view(), name='ebook-review'), path('reviews/<int:pk>/', ReviewDetailAPIView.as_view(), name='review-detail'), ]
from django.urls import path from ebooks.api.views import ( EbookListCreateAPIView, EbookDetailAPIView, ReviewCreateAPIVew, ReviewDetailAPIView, ) urlpatterns = [ path("ebooks/", EbookListCreateAPIView.as_view(), name="ebook-list"), path("ebooks/<int:pk>", EbookDetailAPIView.as_view(), name="ebook-detail"), path( "ebooks/<int:ebook_pk>/review/", ReviewCreateAPIVew.as_view(), name="ebook-review", ), path("reviews/<int:pk>/", ReviewDetailAPIView.as_view(), name="review-detail"), ]
from django.urls import path from ebooks.api.views import EbookListCrearAPIView, EbookDetailAPIView, ResenaCreateAPIView, ResenaDetailAPIView urlpatterns = [ path('ebooks/', EbookListCrearAPIView.as_view(), name='ebook-list'), path('ebooks/<int:pk>', EbookDetailAPIView.as_view(), name='ebook-detail'), path('ebooks/<int:ebook_pk>/resena', ResenaCreateAPIView.as_view(), name='ebook-resena'), path('resena/<int:pk>', ResenaDetailAPIView.as_view(), name='resena-detail'), ]
from django.urls import path from ebooks.api.views import (EbookListCreateAPIView, EbookDetailAPIView, ReviewCreateAPIView, ReviewDetailAPIView) urlpatterns = [ path('list/', EbookListCreateAPIView.as_view(), name='ebook-list'), path('detail/<int:pk>/', EbookDetailAPIView.as_view(), name='ebook-detail'), path('detail/<int:ebook_pk>/review/', ReviewCreateAPIView.as_view(), name='ebook-review'), path('reviews/<int:pk>/', ReviewDetailAPIView.as_view(), name='review-detail') ]
from django.urls import path from ebooks.api.views import EbookListCreateAPIView, EbookDetailAPIView, ReviewCreateAPIView, ReviewDetailAPIView urlpatterns = [ path('', EbookListCreateAPIView.as_view(), name="ebooks-list"), path('<int:pk>/', EbookDetailAPIView.as_view(), name="ebooks-detail"), path('<int:ebook_pk>/review/', ReviewCreateAPIView.as_view(), name="ebooks-review"), path('review/<int:ebook_pk>/', ReviewDetailAPIView.as_view(), name="ebooks-review-detail"), ]