Commit 682daab8 authored by Jan Enzo Salvador's avatar Jan Enzo Salvador

Fixed the class BooksListView and the class BooksDetailView

parent 80fb2962
......@@ -9,10 +9,15 @@ from .models import Author, Books
# Create your views here.
def HomepageView(request):
return render(request, 'bookshelf/home.html', {
})
return render(request, 'bookshelf/home.html')
class BooksView(View):
def get(self, request):
return render(request, 'bookshelf/books.html')
class BooksListView(ListView):
model = Books
template_name = 'bookshelf/books.html'
# default template is called the books_list.html
class BooksDetailView(DetailView):
model = Books
template_name = 'bookshelf/book_details.html'
# default template is called the books_detail.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