Commit e72f854e authored by Deokhyun Lee's avatar Deokhyun Lee

new branch lab04

parent f35453ae
...@@ -11,13 +11,13 @@ class HomeView(View): ...@@ -11,13 +11,13 @@ class HomeView(View):
# Views for Authors page # Views for Authors page
class AuthorListView(ListView): class AuthorListView(ListView):
model = Author model = Author
template_name = 'authors/index.html' template_name = 'authors/authors.html'
context_object_name = 'authors' context_object_name = 'authors'
ordering = ['id'] ordering = ['id']
class AuthorDetailView(DetailView): class AuthorDetailView(DetailView):
model = Author model = Author
template_name = 'authors/author.html' template_name = 'authors/author_details.html'
context_object_name = 'author' context_object_name = 'author'
# this line for getting the param value "pk" # this line for getting the param value "pk"
...@@ -31,11 +31,11 @@ class AuthorDetailView(DetailView): ...@@ -31,11 +31,11 @@ class AuthorDetailView(DetailView):
# Views for Books page # Views for Books page
class BookListView(ListView): class BookListView(ListView):
model = Books model = Books
template_name = 'books/index.html' template_name = 'books/books.html'
context_object_name = 'books' context_object_name = 'books'
ordering = ['id'] ordering = ['id']
class BookDetailView(DetailView): class BookDetailView(DetailView):
model = Books model = Books
template_name = 'books/book.html' template_name = 'books/book_details.html'
context_object_name = 'book' 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