Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions api/pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ def get_page(page_size: int, start_after: Optional[Project] = None):
"""
TODO: Implement this function!

Given a list of items and pagination parameters, return a Page object containing:
Given pagination parameters, return a Page object containing:
- The correct slice of items based on the pagination parameters
- A boolean indicating if there are more results available

Parameters:
items: List of items to paginate
page_size: How many items to return per page
start_after: Optional item to start pagination after

Expand All @@ -34,13 +33,11 @@ def get_page_filtered(
"""
TODO: Implement this function!

Given a list of items, a filter function, and pagination parameters,
return a Page object containing:
Given pagination parameters and a filter function, return a Page object containing:
- The correct slice of filtered items based on the pagination parameters
- A boolean indicating if there are more results available

Parameters:
items: List of items to paginate
page_size: How many items to return per page
filter_fn: Function to filter items
start_after: Optional item to start pagination after
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"start-frontend": "react-scripts start",
"start-api": "uv run api/app.py"
"start-api": "PYTHONUNBUFFERED=1 uv run api/app.py"
},
"browserslist": [
">0.2%",
Expand Down