page:blueprints:hospitality:public directory:django

Hospitality: Public Directory Using Django

A public directory blueprint for hospitality built with Django on Ample.

Domain Schema:

Public Information:

Room types, amenities and rates from property location and policies, events and dining.

Kept out of scope until handling is reviewed: guest identity documents, payment details, stay history. Guest identity documents are sensitive; only availability and booking status are modeled here.

Technical Basis:

Verified on Django: a workspace-scoped table, an explicit state machine (draft to review to published) that rejects invalid transitions, and a cross-workspace read that returns nothing (transitions=true isolation=true).

Representative Queries:

Resource Requirements:

Infrastructure Requirements:

Prerequisites:

  1. 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)
  2. A PostgreSQL driver reading DATABASE_URL (auto-provisioned when omitted)
  3. Bucket credentials from ample bucket create passed as encrypted S3_* environment variables and a published bucket for public assets (CDN_*)
  4. A review of which hospitality data classes may be handled at all; this blueprint models public information only

Workflow Steps:

  1. Model the hospitality domain: Create the tables room_types, inventory_movements, bookings, booking_lines, state_transitions. Room and package catalog lives in room_types; keep sensitive classes (guest identity documents, payment details, stay history) out of this schema.
  2. Workflow step 1: Model listings with a publishing_status state machine scoped to the agency.
  3. Workflow step 2: Serve only published listings, with media from the CDN bucket.
  4. Workflow step 3: Enforce the agency scope on every query.
  5. Workflow step 4: Deploy and verify a published listing and that unpublished listings are absent.
  6. Deploy: Run the synchronous deploy once and read the result. Re-running with no change is a no-op.
  7. Verify: Run the pattern self-test(s) from the example (/p/relational-records) and your own acceptance checks for the hospitality workflow.

Examples:

Success Checks:

Limitations:

Cost Estimate:

Evidence Summary:

Last Verified At:

2026-09-20T03:31:44Z

Next Actions:

  1. Browse the catalog index
  2. Search published recipes by intent, stack and constraints
  3. Prepare a side-effect-free deployment plan for an authorized project
  4. Read the existing agent authentication setup
  5. Browse Hospitality
  6. Browse Public directory
  7. Browse Django
  8. Browse Deploy web app