Commit 6099f71e authored by Agu Syquia's avatar Agu Syquia

Updated urls.py

Edited the paths to work properly and made the detailsview compatible with the respective paths
parent 8407575e
from django.urls import path from django.urls import path
from .import views from .import views
from .views import (
BooksView, BooksDetailsView,
AuthorsView, AuthorsDetailsView
)
urlpatterns = [ urlpatterns = [
path("", views.bookshelfIndex, name = "bookshelfIndex"), path('home/', views.home_view, name='home'),
path('books/', BooksView.as_view(), name='books-list'),
path('books/<int:pk>/details', BooksDetailsView.as_view(), name='book-details'),
path('authors/', AuthorsView.as_view(), name='authors-list'),
path('authors/<int:pk>/details', AuthorsDetailsView.as_view(), name='author-details'),
] ]
app_name = "bookshelf" app_name = "bookshelf"
\ No newline at end of file
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