Commit 04ccba09 authored by RJC's avatar RJC

added BookListView to views.py in bookshelf module

parent 8ce5fca6
from django.shortcuts import render from django.shortcuts import render
from django.views import generic from django.views import generic
# from .models import from .models import Books
# Create your views here. # Create your views here.
...@@ -10,7 +10,10 @@ class HomePageView(generic.TemplateView): ...@@ -10,7 +10,10 @@ class HomePageView(generic.TemplateView):
class BookListView(generic.ListView): class BookListView(generic.ListView):
pass model = Books
template_name = 'bookshelf/books.html'
queryset = Books.objects.all()
context_object_name = 'books'
class BookDetailView(generic.DetailView): class BookDetailView(generic.DetailView):
......
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