Commit b254b554 authored by Ian Rafael T. Aragoza's avatar Ian Rafael T. Aragoza

Changed template names to fit with specifications.

parent d14289a0
...@@ -7,7 +7,7 @@ urlpatterns = [ ...@@ -7,7 +7,7 @@ urlpatterns = [
path('home/', home, name='home'), path('home/', home, name='home'),
path('authors/', AuthorsView.as_view(), name='author-list'), path('authors/', AuthorsView.as_view(), name='author-list'),
path('authors/<int:pk>/details/', AuthorDetailsView.as_view(), name='author-detail'), path('authors/<int:pk>/details/', AuthorDetailsView.as_view(), name='author-detail'),
path('books/', BooksView.as_view(), name='books-list'), path('books/', BooksView.as_view(), name='books'),
path('books/<int:pk>/details/', BookDetailsView.as_view(), name='books-detail'), path('books/<int:pk>/details/', BookDetailsView.as_view(), name='books-detail'),
] ]
......
...@@ -13,15 +13,19 @@ def home(request): ...@@ -13,15 +13,19 @@ def home(request):
class BooksView(ListView): class BooksView(ListView):
model = Book model = Book
template_name = "bookshelf/books.html"
class BookDetailsView(DetailView): class BookDetailsView(DetailView):
model = Book model = Book
template_name = "bookshelf/book_detais.html"
class AuthorsView(ListView): class AuthorsView(ListView):
model = Author model = Author
template_name = "bookshelf/authors.html"
class AuthorDetailsView(DetailView): class AuthorDetailsView(DetailView):
model = Author model = Author
template_name = "bookshelf/author_details.html"
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