Complete the code to import the generic DeleteView class from Django.
from django.views.generic import [1]
The DeleteView is the generic view used to delete objects in Django.
Complete the code to specify the model to delete in a DeleteView subclass.
class BookDeleteView(DeleteView): model = [1]
The model attribute tells the DeleteView which model to delete. Here, it should be Book.
Fix the error in the DeleteView by completing the code to redirect after deletion.
class BookDeleteView(DeleteView): model = Book success_url = [1]
The success_url must be a URL string or a lazy URL. Here, a string URL like '/books/' is correct.
Fill both blanks to complete the URL pattern for the DeleteView.
path('[1]/<int:pk>/delete/', [2].as_view(), name='book-delete')
The URL pattern uses 'book' as the prefix and the view class is BookDeleteView.
Fill all three blanks to complete the DeleteView with template name and success URL.
class BookDeleteView(DeleteView): model = [1] template_name = '[2]' success_url = '[3]'
The model is Book, the template is the confirm delete page for books, and the success URL redirects to the books list.