diff --git a/website/common/views.py b/website/common/views.py index e3269ab..ad84c1a 100644 --- a/website/common/views.py +++ b/website/common/views.py @@ -82,28 +82,16 @@ class AllPagesFeed(Feed): return item.last_published_at -class ContentPageFeed(Feed): +class ContentPageFeed(AllPagesFeed): def __init__(self, posts: PageQuerySet, link: str, title: str): self.posts = posts self.link = link self.title = title super().__init__() - def __call__( - self, request: HttpRequest, *args: list, **kwargs: dict - ) -> HttpResponse: - self.request = request - return super().__call__(request, *args, **kwargs) - def items(self) -> PageQuerySet: return self.posts - def item_title(self, item: BaseContentPage) -> str: - return item.title - - def item_link(self, item: BaseContentPage) -> str: - return item.get_full_url(request=self.request) - def item_description(self, item: BaseContentPage) -> str: return item.summary