# stapel-listings 0.3.7

Listings and catalog vertical: a Listing core (owner, opaque category, typed attribute values, price + price_base, inventory) with a draft/publish lifecycle, an independent moderation status, a value-validation pipeline delegated to stapel-attributes against a category schema fetched over comm, a publish service, and first-class favorites.

Contract: axes 2 · extension points 4.
Generated from docs/capabilities.json by `stapel-llms-txt` — do not edit; drift-gated by `make contract-check`.

## Configuration axes — what a product switches on
Settings keys; `default` is what you get by saying nothing. Turning an axis off unmounts the operations it gates.
- AUTO_APPROVE_ON_PUBLISH [bool, default false] — Auto-approve listings on publish (no moderation module)
  Escape hatch for deployments with no stapel-moderation module installed: publish skips the moderation wait and goes live immediately.
- REQUIRE_IMAGE_ON_PUBLISH [bool, default true] — Require a photo to publish a listing
  Require at least one image reference before a listing can be published.

## Extension points — what a product replaces, fork-free
- AUTH_USER_MODEL [swappable_model]
  Standard Django user swap — Listing.owner and Favorite bind to settings.AUTH_USER_MODEL (models.py:197, models.py:480).
- CATEGORY_FEATURES_FUNCTION [comm_function_name]
  Name of the comm Function resolving a category's feature schema (default 'categories.features', provided by stapel-categories) — REPLACE, single provider (conf.py, MODULE.md).
- PRICE_BASE_CONVERTER [dotted_path]
  Single-strategy REPLACE seam: callable (amount, currency, base) -> Decimal computing price_base. Default is identity; a host with stapel-currencies wires it to a real conversion backend (conf.py, MODULE.md Extension points).
- serializer_seams [class_override]
  ListingViewSet resolves detail_serializer_class / card_serializer_class / draft_serializer_class per action from overridable class attributes; subclass and remount the router to swap any of them (views.py:63-82, MODULE.md Serializer seams).

## Fits with — fleet dependencies
- stapel-attributes (required) — delegates every attribute value check and DTO->DAO conversion to stapel-attributes' engine (pyproject.toml dependency; serializers.py:13, views.py:18)
- stapel-categories (optional) — comm-only dependency: the categories.features Function provides the category feature schema for value validation; no direct Python import (MODULE.md boundaries: 'this module never imports it')
- stapel-core (required) — comm bus (mutate_and_emit/emit/function/call), GDPR provider registry, AUTH_USER_MODEL base (pyproject.toml dependency; apps.py:18, models.py:31, functions.py:20, events.py)
