mirror of
https://github.com/viq/NewsBlur.git
synced 2025-11-01 09:09:16 +00:00
Adding paging (?page=2) to blurblog RSS feeds.
This commit is contained in:
parent
b2325dcbc6
commit
9499f03667
1 changed files with 4 additions and 2 deletions
|
|
@ -1355,7 +1355,9 @@ def shared_stories_rss_feed(request, user_id, username=None):
|
|||
user = User.objects.get(pk=user_id)
|
||||
except User.DoesNotExist:
|
||||
raise Http404
|
||||
|
||||
|
||||
limit = 25
|
||||
offset = request.GET.get('page', 0) * limit
|
||||
username = username and username.lower()
|
||||
profile = MSocialProfile.get_user(user.pk)
|
||||
params = {'username': profile.username_slug, 'user_id': user.pk}
|
||||
|
|
@ -1383,7 +1385,7 @@ def shared_stories_rss_feed(request, user_id, username=None):
|
|||
)
|
||||
rss = feedgenerator.Atom1Feed(**data)
|
||||
|
||||
shared_stories = MSharedStory.objects.filter(user_id=user.pk).order_by('-shared_date')[:25]
|
||||
shared_stories = MSharedStory.objects.filter(user_id=user.pk).order_by('-shared_date')[offset:offset+limit]
|
||||
for shared_story in shared_stories:
|
||||
feed = Feed.get_by_id(shared_story.story_feed_id)
|
||||
content = render_to_string('social/rss_story.xhtml', {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue