Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Simon Daron
panikweb
Commits
ce153691
Commit
ce153691
authored
Jan 27, 2017
by
fred
Browse files
misc: publish latest 20 items in rss feeds
parent
186b2e90
Changes
1
Hide whitespace changes
Inline
Side-by-side
panikweb/views.py
View file @
ce153691
...
...
@@ -676,7 +676,7 @@ class PodcastsFeed(Feed):
def
items
(
self
):
return
SoundFile
.
objects
.
select_related
().
filter
(
podcastable
=
True
).
order_by
(
'-creation_timestamp'
)[:
5
]
podcastable
=
True
).
order_by
(
'-creation_timestamp'
)[:
20
]
def
item_title
(
self
,
item
):
if
item
.
fragment
:
...
...
@@ -715,7 +715,7 @@ class RssNewsFeed(Feed):
description_template
=
'feed/newsitem.html'
def
items
(
self
):
return
NewsItem
.
objects
.
order_by
(
'-date'
)[:
1
0
]
return
NewsItem
.
objects
.
order_by
(
'-date'
)[:
2
0
]
rss_news_feed
=
RssNewsFeed
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment