Commit 75c51014 authored by Angelo Alvarez's avatar Angelo Alvarez

Added explicit template names for existing Views

parent fba2c8bb
......@@ -10,15 +10,19 @@ def home(request):
return render(request, 'bookshelf/home.html')
class BooksListView(ListView):
template_name = 'bookshelf/books_list.html'
model = Books
class BooksDetailView(DetailView):
template_name = 'bookshelf/books_detail.html'
model = Books
class AuthorListView(ListView):
template_name = 'bookshelf/author_list.html'
model = Author
class AuthorDetailView(DetailView):
template_name = 'bookshelf/author_detail.html'
model = Author
booklist = Books.objects.all()
extra_context = { 'books' : booklist }
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