Added urls and imported view functions for the new pages

parent d9b95add
from django.urls import path
from .views import index
from .views import (
HomepageView,
BooksPageView, BooksDetailsView,
AuthorsPageView, AuthorsDetailsView
)
urlpatterns = [
path('', index, name='index'),
path('home/', HomepageView.as_view(), name='home'),
path('books/', BooksPageView.as_view(), name='books'),
path('books/<int:pk>/details/', BooksDetailsView.as_view(), name='book-item'),
path('authors/', AuthorsPageView.as_view(), name='authors'),
path('authors/<int:pk>/details/', AuthorsDetailsView.as_view(), name='author-item'),
]
app_name = "bookshelf"
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