listview and detailview django code example
Example 1: django listview
class YourView(ListView):
model = YourModel
paginate_by = your_pagination_number
context_object_name = 'your_model_in_plural'
template_name = 'your_list.html'
Example 2: django display view library
from django.views.generic.detail import DetailView