(podcast, user, offset=0, limit=20)
return (
        Episode.objects.filter(
            podcast=podcast, order__lte=page_start, order__gt=page_end
        )
        .prefetch_related("slugs")
        .order_by("-order")
    )
Returns a list of episodes
Returns a list of episodes
Returns a list of episodes
def episode_list(podcast, user, offset=0, limit=20):
    """Returns a list of episodes"""
    # fast pagination by using Episode.order instead of offset/limit
    if podcast.max_episode_order is None:
        return []

    page_start = podcast.max_episode_order - offset
    page_end = page_start - limit
    return (
        Episode.objects.filter(
            podcast=podcast, order__lte=page_start, order__gt=page_end
        )
        .prefetch_related("slugs")
        .order_by("-order")
    )
def episode_list ( podcast , user , offset = 0 , limit = 20 ) : # fast pagination by using Episode.order instead of offset/limit if podcast . max_episode_order is None : return [ ] page_start = podcast . max_episode_order - offset page_end = page_start - limit return ( Episode . objects . filter ( podcast = podcast , order__lte = page_start , order__gt = page_end ) . prefetch_related ( "slugs" ) . order_by ( "-order" ) )