Commit dce36ff1 authored by Agu Syquia's avatar Agu Syquia

Updated urls.py

Added paths to authors/add, books/add, authors/pk/add, and authors/pk/edit.
parent 0ce15583
......@@ -2,7 +2,10 @@ from django.urls import path
from .import views
from .views import (
BooksView, BooksDetailsView,
AuthorsView, AuthorsDetailsView
AuthorsView, AuthorsDetailsView,
BooksCreateView, BooksUpdateView,
AuthorsCreateView, AuthorsUpdateView
)
urlpatterns = [
......@@ -11,6 +14,10 @@ urlpatterns = [
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'),
path('books/add/', BooksCreateView.as_view(), name='add-book'),
path('books/<int:pk>/details/edit/', BooksUpdateView.as_view(), name='books-edit'),
path('authors/add/', AuthorsCreateView.as_view(), name='add-author'),
path('authors/<int:pk>/details/edit/', AuthorsUpdateView.as_view(), name='books-edit'),
]
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