Commit 1c39c831 authored by RJC's avatar RJC

added BookCreateView to views.py in bookshelf module

parent 1759e760
...@@ -16,6 +16,12 @@ class BookListView(generic.ListView): ...@@ -16,6 +16,12 @@ class BookListView(generic.ListView):
context_object_name = 'books' context_object_name = 'books'
class BookCreateView(generic.CreateView):
model = Books
fields = '__all__'
template_name = 'bookshelf/add-book.html'
class BookDetailView(generic.DetailView): class BookDetailView(generic.DetailView):
model = Books model = Books
template_name = 'bookshelf/book_detail.html' template_name = 'bookshelf/book_detail.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