Skip to content

Commit 57077d6

Browse files
committed
exclude "pages" section from latest list and rss feed
1 parent 1a73b6f commit 57077d6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

infinitefeed/blocks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class SidebarLatestBlock(AbstractArticleList):
135135
def get_context(self, value, parent_context=None):
136136
context = super().get_context(value, parent_context=parent_context)
137137
context['title'] = value["title"]
138-
context['articles'] = ArticlePage.objects.live().public().order_by('-first_published_at')[:5]
138+
context['articles'] = ArticlePage.objects.live().public().exclude(current_section = "pages").order_by('-first_published_at')[:5]
139139
return context
140140

141141
class SidebarManualArticles(AbstractArticleList):

ubyssey/views/feed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def feed_extra_kwargs(self, obj):
6363
"image_link": 'https://ubyssey.ca'}
6464

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

6969
def item_title(self, item):

0 commit comments

Comments
 (0)