Exemplo n.º 1
0
def get_previous_page_uri(request, page, page_size):
    if page > 2:
        return build_uri(request.path, request.query_string, page=page - 1)
    elif page == 2:
        return build_uri(request.path, request.query_string, page=None)
    else:
        return None
Exemplo n.º 2
0
def get_previous_page_uri(request, page, page_size):
    if page > 2:
        return build_uri(request.path, request.query_string, page=page - 1)
    elif page == 2:
        return build_uri(request.path, request.query_string, page=None)
    else:
        return None
Exemplo n.º 3
0
def get_next_page_uri(request, page, page_size, count):
    if page < ceil(count / page_size):
        return build_uri(request.path, request.query_string, page=page + 1)
    else:
        return None
Exemplo n.º 4
0
def get_next_page_uri(request, page, page_size, count):
    if page < ceil(count / page_size):
        return build_uri(request.path, request.query_string, page=page + 1)
    else:
        return None