Imported new view functions and added paths to be used for adding and updating data

parent 64ef838b
...@@ -2,7 +2,9 @@ from django.urls import path ...@@ -2,7 +2,9 @@ from django.urls import path
from .views import ( from .views import (
HomepageView, HomepageView,
BooksPageView, BooksDetailsView, BooksPageView, BooksDetailsView,
AuthorsPageView, AuthorsDetailsView AuthorsPageView, AuthorsDetailsView,
AddBookView, AddAuthorView,
EditBookView, EditAuthorView
) )
urlpatterns = [ urlpatterns = [
...@@ -11,6 +13,10 @@ urlpatterns = [ ...@@ -11,6 +13,10 @@ urlpatterns = [
path('books/<int:pk>/details/', BooksDetailsView.as_view(), name='book-item'), path('books/<int:pk>/details/', BooksDetailsView.as_view(), name='book-item'),
path('authors/', AuthorsPageView.as_view(), name='authors'), path('authors/', AuthorsPageView.as_view(), name='authors'),
path('authors/<int:pk>/details/', AuthorsDetailsView.as_view(), name='author-item'), path('authors/<int:pk>/details/', AuthorsDetailsView.as_view(), name='author-item'),
path('books/add/', AddBookView.as_view(), name='book-add'),
path('books/<int:pk>/edit/', EditBookView.as_view(), name='book-edit'),
path('authors/add/', AddAuthorView.as_view(), name='author-add'),
path('authors/<int:pk>/edit/', EditAuthorView.as_view(), name='author-edit'),
] ]
app_name = "bookshelf" 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