Skip to content
bossfight
.dev
roadmap
problems
rounds
guides
patterns
quiz
mock
math
progress
Search
Ctrl K
~/rounds
Order pages
medium
60 min
Python
Stripe Bug Squash-style
Meta AI-enabled coding-style
1
Page 2 shows an order twice
2
Build a feature
3
Make it fast
repo
shop/
__init__.py
api.py
models.py
pagination.py
pricing.py
reports.py
store.py
tests/
visible/
test_orders_page.py
factory.py
report_data.py
README.md
README.md
read-only
# shop A tiny order backend: orders, an order store, paged listing for the account page, pricing, and a monthly report. shop/models.py Order and Line shop/store.py OrderStore: add orders, list them newest first shop/pagination.py paginate(): one page of a list, plus has_next shop/api.py list_orders(): what the account page calls shop/pricing.py line and order totals, in cents shop/reports.py monthly reports Run the tests with `python -m pytest` (or press Run in the browser).
esc