django detail view 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 detailview
class YourView(DetailView):
model = YourModel
template_name = 'your_template.html'