page:blueprints:direct to consumer brands:product catalog:django
Direct-to-consumer brands: product catalog using Django
Summary
A product catalog blueprint for direct-to-consumer brands built with Django on Ample. Domain schema: products (sku, name, collection, price, active): product catalog; stock_movements (sku, warehouse, delta, reason, moved_at): fulfillment stock; orders (order_no, channel, status, placed_at): orders with status transitions; order_lines (order_no, sku, qty, unit_price): order contents; events (seq, record_type, record_id, kind, at): application-owned history written in the same transaction. Public information: product catalog and collections, shipping and returns policy, brand story. Kept out of scope until handling is reviewed: customer contact and payment details, discount codes tied to individuals. Checkout and payment are handled by your commerce provider; only catalog, stock and order status are modeled here.
Framework
Django
Workload
Product catalog
Industry
Direct-to-consumer brands
Release Status
Published
Support Status
Verified
Execution Status
Ready
Prerequisites
- A Django project (pip install into .ample/python from requirements.txt, then waitress serving project.wsgi from run.py reading PORT on the python-3.12 template)
- A PostgreSQL driver reading DATABASE_URL (auto-provisioned when omitted)
- Bucket credentials from
ample bucket createpassed as encrypted S3_* environment variables - A review of which direct-to-consumer brands data classes may be handled at all; this blueprint models public information only
Tested Configuration
- Template: python-3.12
- Runtime: python
- Size: s-1vcpu-1gb
- Install: python3 -m pip install --target .ample/python -r requirements.txt
- Start: PYTHONPATH=.ample/python:${PYTHONPATH:-} python3 run.py
Input Schema
- env: Encrypted environment variables
- name: App name (maxLength: 63, minLength: 1, pattern: ^[a-z0-9-]+$)
- path: Project directory or ample.toml service (maxLength: 512, minLength: 1)
- release_command: Migration command run before activation (maxLength: 512)
- start: Start command (maxLength: 512)
Workflow Steps
- Model the direct-to-consumer brands domain: Create the tables products, stock_movements, orders, order_lines, events. Product catalog lives in products; keep the sensitive classes (customer contact and payment details, discount codes tied to individuals) out of this schema.
- Workflow step 1: Model the SKU catalog with versioned updates
- Workflow step 2: Record every catalog change as an event in the same transaction
- Workflow step 3: Reject stale concurrent updates
- Workflow step 4: Deploy and verify history and conflict handling
- Deploy: Run the synchronous deploy once and read the result. Re-running with no change is a no-op.
- Verify: Run the pattern self-test(s) from the example (/p/transactional-workflows) and your own acceptance checks for the direct-to-consumer brands workflow.
Examples
- Django pattern fixture: Verified transactional workflows basis for this blueprint.
Success Checks
- App responds on its public URL
- Transactional-workflows self-test from the example
Limitations
- The technical basis (transactional workflows on Django) was verified with the pattern fixture; the direct-to-consumer brands schema and workflow are an original design for this blueprint and were not executed as a separate application.
- No health, financial, privacy or other compliance claim is made.
Cost Estimate
- Monthly Amount: 10.0 USD
- Note: Always-on monthly price of the tested sizes; apps and databases auto-pause when idle.
Evidence Summary
- Django pattern fixture deployed on Ample (pip install into .ample/python from requirements.txt,...)
Last Verified At
2026-09-20T03:31:44Z