from django.views.generic import ListView
from books.models import Publisher
class PublisherList(ListView):
model = Publisher
That’s all the Python code we need to write. We still need to write a template, however. We could explicitly tell the view which template to use by adding a template_name attribute to the view, but in the absence of an explicit template Django will infer one from the object’s name. In this case, the inferred template will be "books/publisher_list.html" – the “books” part comes from the name of the app that defines the model, while the “publisher” bit is the lowercased version of the model’s name.
Display list and detail pages for a single object.
Allow users to create, update, and delete objects – with or without authorization.