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