收到错误消息:缺少 SchoolDetailsView 或覆盖 SchoolDetailsView.get_queryset,我应该在下面的代码中修复什么?

Getting error as: SchoolDetailsView is missing or override SchoolDetailsView.get_queryset, what should I fix in below code?

Model.py

class School(models.Model):
    name = models.CharField(max_length=256)
    principal = models.CharField(max_length=256)
    location = models.CharField(max_length=256)

    def __str__(self):
        return self.name


class Student(models.Model):
    name = models.CharField(max_length=256)
    age = models.PositiveIntegerField()
    school = models.ForeignKey(School, related_name='students', on_delete=models.CASCADE)

    def __str__(self):
        return self.name

Views.py

class SchoolDetailsView(DetailView):
    context_object_name = 'school_detail'
    models = models.School
    template_name = 'basic_app/school_details.html'

html代码代码看起来像下面评论中提到的

模板

Name: {{ school_detail.name }} 
Principal: {{ school_detail.principal }} 
Location: {{ school_detail.location }} 
{% for student in school_detail.students.all() %} 
{{ student.name }} who is {{ student.age }} years old. 
{% endfor %}

urls.py

path('', views.SchoolListView.as_view(), name='list'),
path('<int:pk>/', views.SchoolDetailsView.as_view(), name="detail"),

任何人都可以建议我在此代码中缺少什么吗?

我认为是详细视图的错字,应该是model=而不是models=