CBV implementation of BookUpdateView

parent db7922ac
...@@ -23,6 +23,11 @@ class BookCreateView(CreateView): ...@@ -23,6 +23,11 @@ class BookCreateView(CreateView):
template_name = 'bookshelf/add-book.html' template_name = 'bookshelf/add-book.html'
fields = '__all__' fields = '__all__'
class BookUpdateView(UpdateView):
template_name = 'bookshelf/edit-book.html'
model = Book
fields = '__all__'
class AuthorListView(ListView): class AuthorListView(ListView):
model = Author model = Author
template_name = 'bookshelf/authors.html' template_name = 'bookshelf/authors.html'
......
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