(objects, request_params)
return reverse('api_messaging_event_list', args=[request_params.domain], params=next_params, absolute=True)
Generate the 'cursor' parameter which includes all query params from the current
    request excluding 'limit' as well as:
      - filter parameter for the next page e.g. date.gte = last date
      - ID of the last object in the current page to allow skipping it in the next page
Generate the 'cursor' parameter which includes all query params from the current
    request excluding 'limit' as well as:
      - filter parameter for the next page e.g. date.gte = last date
      - ID of the last object in the current page to allow skipping it in the next page
Generate the cursor parameter which includes all query params from the current request excluding limit as well as : - filter parameter for the next page e . g . date . gte = last date - ID of the last object in the current page to allow skipping it in the next page
def _get_cursor(objects, request_params):
    """Generate the 'cursor' parameter which includes all query params from the current
    request excluding 'limit' as well as:
      - filter parameter for the next page e.g. date.gte = last date
      - ID of the last object in the current page to allow skipping it in the next page
    """
    if not objects:
        return None

    ascending_order = True
    if "order_by" in request_params:
        if request_params["order_by"].startswith("-"):
            ascending_order = False

    last_object = objects[-1]

    filter_param = "date.gte" if ascending_order else "date.lte"
    cursor_params = request_params.params.copy()
    cursor_params.update({
        filter_param: last_object.date.isoformat(),
        LAST_OBJECT_ID: str(last_object.id)
    })
    encoded_params = urlencode(cursor_params)
    next_params = {'cursor': b64encode(encoded_params.encode('utf-8'))}
    return reverse('api_messaging_event_list', args=[request_params.domain], params=next_params, absolute=True)
def _get_cursor ( objects , request_params ) : if not objects : return None ascending_order = True if "order_by" in request_params : if request_params [ "order_by" ] . startswith ( "-" ) : ascending_order = False last_object = objects [ - 1 ] filter_param = "date.gte" if ascending_order else "date.lte" cursor_params = request_params . params . copy ( ) cursor_params . update ( { filter_param : last_object . date . isoformat ( ) , LAST_OBJECT_ID : str ( last_object . id ) } ) encoded_params = urlencode ( cursor_params ) next_params = { 'cursor' : b64encode ( encoded_params . encode ( 'utf-8' ) ) } return reverse ( 'api_messaging_event_list' , args = [ request_params . domain ] , params = next_params , absolute = True )