summaryrefslogtreecommitdiff
path: root/foundation/feeds.py
blob: 072a9c8e0a6c3bb71639ba155a82fa35e1e27498 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from datetime import datetime, time

from django.contrib.syndication.views import Feed
from django.utils.timezone import make_aware
from django.utils.translation import gettext_lazy as _

from .models import Meeting


class FoundationMinutesFeed(Feed):
    title = _("The DSF meeting minutes")
    link = "https://www.djangoproject.com/foundation/minutes/"
    description = _("The meeting minutes of the Django Software Foundation's board.")

    def items(self):
        return Meeting.objects.order_by("-date")[:10]

    def item_pubdate(self, item):
        return make_aware(datetime.combine(item.date, time.min))

    def item_author_name(self, item):
        return _("DSF Board")

    def item_title(self, item):
        return str(item)