# Django Tutorial page 4, Amend Views section

**URL:** <https://forum.djangoproject.com/t/django-tutorial-page-4-amend-views-section/11942>\
**Category:** Getting Started\
**Created:** [February 2, 2022, 6:48pm UTC](https://forum.djangoproject.com/t/django-tutorial-page-4-amend-views-section/11942 "2022-02-02T18:48:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![101is5](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/101is5/32/6144_2.png) [@101is5](https://forum.djangoproject.com/u/101is5)\
**Post date:** [February 2, 2022, 6:48pm UTC](https://forum.djangoproject.com/t/django-tutorial-page-4-amend-views-section/11942/1 "2022-02-02T18:48:35Z")

</div>

This section states: “Each generic view needs to know what model it will be acting upon. This is provided using the `model` attribute.”, right after the code example: a definition of a ListView based class, not using the aforementioned attribute.

```auto
class IndexView(generic.ListView):
    # Where's 'model'?
    template_name = 'polls/index.html' 
    context_object_name = 'latest_question_list'

    def get_queryset(self):
        """Return the last five published questions."""
        return Question.objects.order_by('-pub_date')[:5]

class DetailView(generic.DetailView):
    model = Question
    ...

* Each generic view needs to know...

```

I know it has a query inside a method, though, so maybe the text could be clearer, like “…using either a ‘model’ attribute, or a query”.

What am I missing?  
In this case particularly, how does one know in advance that “This is provided by using the ‘model’ attribute.” doesn’t mean only that?

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [February 2, 2022, 9:39pm UTC](https://forum.djangoproject.com/t/django-tutorial-page-4-amend-views-section/11942/2 "2022-02-02T21:39:49Z")

</div>

For what it’s worth, I agree with you.

The model to be used is specified using either the model _or_ queryset attribute, or the `get_queryset` method.

I don’t believe you’re missing anything.

---

<div class="post-metadata">

**Author:** ![101is5](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/101is5/32/6144_2.png) [@101is5](https://forum.djangoproject.com/u/101is5)\
**Post date:** [February 3, 2022, 12:37pm UTC](https://forum.djangoproject.com/t/django-tutorial-page-4-amend-views-section/11942/3 "2022-02-03T12:37:18Z")

</div>

I’ve just found a topic that explains just that: [Built-in class-based generic views | Django documentation | Django](https://docs.djangoproject.com/en/4.0/topics/class-based-views/generic-display/#viewing-subsets-of-objects)

Django’s docs seem to be built on this kind of approach, always teasing the reader with something new or not yet so clear. I don’t know, it either might encourage searching around, or get quite confusing.
