Commit 04a53696 authored by RJC's avatar RJC

modified AuthorListView in views.py in bookshelf module

parent 07ef7bdb
from django.shortcuts import render
from django.views import generic
from .models import Books
from .models import Books, Author
# Create your views here.
......@@ -24,8 +24,10 @@ class BookDetailView(generic.DetailView):
class AuthorListView(generic.ListView):
pass
model = Author
template_name = 'bookshelf/authors.html'
queryset = Author.objects.all()
context_object_name = 'authors'
class AuthorDetailView(generic.DetailView):
pass
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