← Back to Available Cards
Ponyta
COMMON Pokemon

Ponyta

Listing Price

Database query walkthrough

Listing detail query

Asks for one buyable listing and its related card data.

Django path
frontend.services.listing_service.get_listing
Tables touched
MarketListing, InventoryItem, CardVariant, Card, CardGame, CardSet, CardImage, User
  1. Ask for listings with ACTIVE status and quantity_available greater than zero.
  2. Filter by the listing id from the URL.
  3. Return no row when the listing is inactive, paused, cancelled, sold out, or unavailable.
  4. Ask for seller and card metadata rows through the listing relationship.
  5. Read the matching listing row for the detail template.
ORM shape
MarketListing.objects.filter(status=ACTIVE, quantity_available__gt=0)
    .select_related(...)
    .filter(pk=listing_id)
    .first()
$1.30
Seller randomaccount2123
Set Team Up
Condition MINT
Available 1
Login to Buy