# Path: minutes/feeds.py
# class MinutesFeed(Feed):
#     title = 'PSF Board Meeting Minutes Feed'
#     description = 'PSF Board Meeting Minutes'
#     link = reverse_lazy('minutes_list')
# 
#     def items(self):
#         return Minutes.objects.latest()[:20]
# 
#     def item_title(self, item):
#         return f'PSF Meeting Minutes for {item.date}'
# 
#     def item_description(self, item):
#         return item.content
# 
#     def item_pubdate(self, item):
#         # item.date is a datetime.date, this needs a datetime.datetime,
#         # so set it to midnight on the given date
#         return datetime.combine(item.date, datetime.min.time())


from .feeds import MinutesFeed
from . import views
from django.urls import path, re_path


urlpatterns = [
    path('', views.MinutesList.as_view(), name='minutes_list'),
    path('feed/', MinutesFeed(), name='minutes_feed'),
    re_path(r'^(?P<year>[0-9]{4})-(?P<month>[0-9]{2})-(?P<day>[0-9]{2})/$', views.MinutesDetail.as_view(), name='minutes_detail'),

# Path: minutes/feeds.py
# class MinutesFeed(Feed):
#     title = 'PSF Board Meeting Minutes Feed'
#     description = 'PSF Board Meeting Minutes'
#     link = reverse_lazy('minutes_list')
# 
#     def items(self):
#         return Minutes.objects.latest()[:20]
# 
#     def item_title(self, item):
#         return f'PSF Meeting Minutes for {item.date}'
# 
#     def item_description(self, item):
#         return item.content
# 
#     def item_pubdate(self, item):
#         # item.date is a datetime.date, this needs a datetime.datetime,
#         # so set it to midnight on the given date
#         return datetime.combine(item.date, datetime.min.time())


# Path: minutes/urls.py
from .feeds import MinutesFeed
from . import views
from django.urls import path, re_path



urlpatterns = [
    path('', views.MinutesList.as_view(), name='minutes_list'),
    path('feed/', MinutesFeed(), name='minutes_feed'),
    re_path(r'^(?P<year>[0-9]{4})-(?P<month>[0-9]{2})-(?P<day>[0-9]{2})/$', views.MinutesDetail.as_view(), name='minutes_detail'),

]