Commit e72f854e authored by Deokhyun Lee's avatar Deokhyun Lee

new branch lab04

parent f35453ae
......@@ -11,15 +11,15 @@ class HomeView(View):
# Views for Authors page
class AuthorListView(ListView):
model = Author
template_name = 'authors/index.html'
template_name = 'authors/authors.html'
context_object_name = 'authors'
ordering = ['id']
class AuthorDetailView(DetailView):
model = Author
template_name = 'authors/author.html'
template_name = 'authors/author_details.html'
context_object_name = 'author'
# this line for getting the param value "pk"
# returns Dict[str, Any]
def get_context_data(self, **kwargs):
......@@ -31,11 +31,11 @@ class AuthorDetailView(DetailView):
# Views for Books page
class BookListView(ListView):
model = Books
template_name = 'books/index.html'
template_name = 'books/books.html'
context_object_name = 'books'
ordering = ['id']
class BookDetailView(DetailView):
model = Books
template_name = 'books/book.html'
template_name = 'books/book_details.html'
context_object_name = 'book'
\ No newline at end of file
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