Changed template names to match project specifications

parent 2641dd11
from django.shortcuts import render from django.shortcuts import render
from django.http import HttpResponse
from django.views import View from django.views import View
from django.views.generic.list import ListView from django.views.generic.list import ListView
from django.views.generic.detail import DetailView from django.views.generic.detail import DetailView
...@@ -14,17 +13,21 @@ class HomepageView(View): ...@@ -14,17 +13,21 @@ class HomepageView(View):
class BooksPageView(ListView): class BooksPageView(ListView):
model = Books model = Books
template_name = 'bookshelf/books.html'
context_object_name = 'book_list' context_object_name = 'book_list'
class BooksDetailsView(DetailView): class BooksDetailsView(DetailView):
model = Books model = Books
template_name = 'bookshelf/book_details.html'
class AuthorsPageView(ListView): class AuthorsPageView(ListView):
model = Author model = Author
template_name = 'bookshelf/authors.html'
context_object_name = 'author_list' context_object_name = 'author_list'
class AuthorsDetailsView(DetailView): class AuthorsDetailsView(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