Commit b55227b2 authored by enricosuplico's avatar enricosuplico

added urls.py

parent 8298c38f
from django.urls import path from django.urls import path
from .views import Homepage_View, Books_List_View, Books_Detail_View, Authors_List_View, Authors_Detail_View from .views import Homepage_View, Books_List_View, Books_Detail_View, Authors_List_View, Authors_Detail_View, Book_Create_View, Author_Create_View, Book_Update_View, Author_Update_View
urlpatterns = [ urlpatterns = [
path('home/', Homepage_View, name='home'), path('home/', Homepage_View, name='home'),
...@@ -7,4 +7,8 @@ urlpatterns = [ ...@@ -7,4 +7,8 @@ urlpatterns = [
path('books/<int:pk>/details/', Books_Detail_View.as_view(), name='book-details'), path('books/<int:pk>/details/', Books_Detail_View.as_view(), name='book-details'),
path('authors/', Authors_List_View.as_view(), name='authors-list'), path('authors/', Authors_List_View.as_view(), name='authors-list'),
path('authors/<int:pk>/details/', Authors_Detail_View.as_view(), name='author-details'), path('authors/<int:pk>/details/', Authors_Detail_View.as_view(), name='author-details'),
path('books/add/', Book_Create_View.as_view(), name='add-book'),
path('authors/add/', Author_Create_View.as_view(), name='add-author'),
path('books/<pk>/edit/', Book_Update_View.as_view(), name='edit-book'),
path('authors/<pk>/edit/', Author_Update_View.as_view(), name='edit-author'),
] ]
\ 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