title: How to limit the number of items displayed in Django app
body: <p>I have this Django model in my newspaper app:</p>
  
  <pre><code>class Article(models.Model):
      title = models.CharField(max_length=255)
      body = models.TextField()
      date = models.DateTimeField(auto_now_add=True)
      author = models.ForeignKey(
          get_user_model(),
          on_delete=models.CASCADE,
      )
  
      def __str__(self):
          return self.title
  
      def get_absolute_url(self):
          return reverse('article_detail', args=[str(self.id)])
  </code></pre>
  
  <p>It currently displays all articles but I want to limit what is displayed to the 3 most recent articles. How is that done?</p>
  
  <p>This is my view:</p>
  
  <pre><code>class ArticleListView(LoginRequiredMixin, ListView):
      model = Article
      template_name = 'article_list.html'
      login_url = 'login'
  </code></pre>
  
  <p>This is the html template:</p>
  
  <pre><code>{% extends 'base.html' %}
  
  {% block title %}Articles{% endblock title %}
  
  {% block content %}
    {% for article in object_list %}
      &lt;div class="card"&gt;
        &lt;div class="card-header"&gt;
          &lt;span class="font-weight-bold"&gt;{{ article.title }}&lt;/span&gt; &amp;middot;
          &lt;span class="text-muted"&gt;by {{ article.author }} | {{ article.date }}&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class="card-body"&gt;
          &lt;p&gt;{{ article.body }}&lt;/p&gt;
          &lt;a href="{% url 'article_edit' article.pk %}"&gt;Edit&lt;/a&gt;
          &lt;a href="{% url 'article_delete' article.pk %}"&gt;Delete&lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="card-footer"&gt;
          {% for comment in article.comments.all %}
            &lt;p&gt;
              &lt;span class="font-weight-bold"&gt;{{ comment.author }} &amp;middot;&lt;/span&gt;
              {{ comment }}
            &lt;/p&gt;
          {% endfor %}
        &lt;/div&gt;
      &lt;/div&gt;
  &lt;br /&gt;
    {% endfor %} 
  {% endblock content %}
  </code></pre>