Commit b5537859 authored by Ysabella Panghulan's avatar Ysabella Panghulan

added Author list and detail views in urlpatterns

parent 4d414f72
from django.urls import path from django.urls import path
from . import views from . import views
from .views import (Homepage, BooksListView, BooksDetailView) from .views import (Homepage, BooksListView, BooksDetailView, AuthorListView, AuthorDetailView)
urlpatterns = [ urlpatterns = [
path('authors', AuthorListView.as_view(), name='authors'),
path('authors/<int:pk>/details', AuthorDetailView.as_view(), name='author-details'),
path('books', BooksListView.as_view(), name='books'), path('books', BooksListView.as_view(), name='books'),
path('books/<int:pk>/details', BooksDetailView.as_view(), name='book-details'), path('books/<int:pk>/details', BooksDetailView.as_view(), name='book-details'),
path('home', Homepage.as_view(), name='home'), path('home', Homepage.as_view(), name='home'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment