Stream-Framework icon indicating copy to clipboard operation
Stream-Framework copied to clipboard

Cursor-based pagination

Open maryokhin opened this issue 9 years ago • 1 comments

Hi, I tried integrating the framework in an existing project, but quickly ran into a problem that my client uses cursor-based pagination for the feed. The cursor is based on a timestamp, so I need to filter the feed by timestamp somehow.

activities = feed_manager.get_user_feed(user.pk).filter(activity_created__gte???)[:page_size]
boards = Board.objects.filter(pk__in=[a.object_id for a in activities])

The only examples I found were limit-offset or page-based pagination, which seem completely pointless for a real-time feed where there will be gaps and duplicates as new items come in.

Is this possible somehow?

maryokhin avatar May 08 '16 07:05 maryokhin

Hey @maryokhin Have you found some way to solve this ?

ankitmlive avatar Jun 11 '21 19:06 ankitmlive