Почему пишет ошибка 'QuerySet' object has no attribute 'pub_date'

views:

def articles_filter(request, pk):
    latest_artiсles_list = Article.objects.all().order_by('-pub_date')[:20]
    if pk == 1:
        now = timezone.now() - datetime.timedelta(days=7)
        latest_artiсles_list = latest_artiсles_list.filter(latest_artiсles_list.pub_date ==now)
    return render(request, 'articles/list.html', {'latest_artiсles_list': latest_artiсles_list})

models:

class Article(models.Model):
    article_title = models.CharField('название статьи', max_length=200)
    article_text = models.TextField('текст статьи')
    min_text = models.CharField('мин текст', max_length=300)
    pub_date = models.DateTimeField('дата публикации')
    article_image = models.ImageField(null=True, blank=True, upload_to="img/", verbose_name='изображение')
    views = models.ManyToManyField(Ip, related_name="post_views", blank=True)

    def total_views(self):
        return self.views.count()

    def __str__(self):
        return self.article_title or ''

шаблон:

<div class="filter">
        <a href="{% url 'articles:index' %}" class="btn-grey" style="margin-right: -6px;">Все потоки</a>
        <a href="{% url 'articles:articles_filter' pk=1 %}" class="btn-grey" style="border-radius: 0; margin-right: -6px;">Новое</a>
        <a href="#" class="btn-grey" style="border-radius: 0 5px 5px 0;">Лучшее<img src="{% static 'articles/img/galochka.png' %}" alt="галочка"></a>
    </div>

когда я нажимаю на кнопку новое, выходит ошибка 'QuerySet' object has no attribute 'pub_date'. Я не понимаю как через latest_artiсles_list достать pub_date. введите сюда описание изображения

Вернуться на верх