Skip to content

Commit

Permalink
exclude "pages" section from latest list and rss feed
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelmdLow committed Jan 9, 2025
1 parent 1a73b6f commit 57077d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion infinitefeed/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class SidebarLatestBlock(AbstractArticleList):
def get_context(self, value, parent_context=None):
context = super().get_context(value, parent_context=parent_context)
context['title'] = value["title"]
context['articles'] = ArticlePage.objects.live().public().order_by('-first_published_at')[:5]
context['articles'] = ArticlePage.objects.live().public().exclude(current_section = "pages").order_by('-first_published_at')[:5]
return context

class SidebarManualArticles(AbstractArticleList):
Expand Down
2 changes: 1 addition & 1 deletion ubyssey/views/feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def feed_extra_kwargs(self, obj):
"image_link": 'https://ubyssey.ca'}

def items(self, section):
return ArticlePage.objects.live().public().order_by('-explicit_published_at')[:self.max_items]
return ArticlePage.objects.live().public().exclude(current_section = "pages").order_by('-explicit_published_at')[:self.max_items]
# .get_frontpage(limit=self.max_items)

def item_title(self, item):
Expand Down

0 comments on commit 57077d6

Please sign in to comment.