page:blueprints:course creators:event registration:django

Course creators: event registration using Django

Summary

A event registration blueprint for course creators built with Django on Ample. Domain schema:

Representative Queries

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
  4. A review of which course creators data classes may be handled at all; this blueprint models public information only

Workflow Steps

  1. Model the course creators domain: Create the tables course_groups, memberships, sessions, materials, events. Cohorts as course groups live in course_groups; keep the sensitive classes (learner progress and grades, recordings showing learners, payment status) out of this schema.
  2. Workflow step 1: Model sessions with capacity and registrations with status
  3. Workflow step 2: Register transactionally with a capacity check and an event per registration
  4. Workflow step 3: Reject stale concurrent updates
  5. Workflow step 4: Deploy and verify history and conflict handling
  6. Deploy: Run the synchronous deploy once and read the result. Re-running with no change is a no-op.
    Command: ample deploy . --name --public --start "python3 run.py" --env S3_ENDPOINT=... --env S3_REGION=... --env S3_BUCKET=... --env S3_ACCESS_KEY_ID=... --env S3_SECRET_ACCESS_KEY=...
  7. Verify: Run the pattern self-test(s) from the example (/p/transactional-workflows) and your own acceptance checks for the course creators workflow.
    Command: ample logs --kind build

Cost Estimate

Success Checks

  1. App responds on its public URL
    • Kind: http_get
    • Path: /
    • Expect: ample canary django patterns
  2. Transactional-workflows self-test from the example
    • Kind: http_get
    • Path: /p/transactional-workflows
    • Expect: see the pattern fixture checks

Limitations