feat: auto registration email with token link + Westside branding #36
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/basketball-api!36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "35-auto-registration-email"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
After Stripe payment completes, the webhook handler now auto-generates a
registration_tokenfor the parent (if they don't already have one) and sends a branded confirmation email containing a "Complete Registration" link. The email uses Westside red/black branding instead of the old blue/gold scheme.Changes
src/basketball_api/services/registration.py-- Addedimport secrets; after parent creation/lookup inprocess_checkout_completed(), generatesregistration_tokenviasecrets.token_urlsafe(32)if the parent doesn't have one yet.src/basketball_api/services/email.py-- Rewrotesend_confirmation_email()to include a personalized registration link ({base_url}/register?token={token}). Replaced blue/gold HTML template with Westside red/black branding (#d42026,#0a0a0a,#141414,#f0f0f0,#a0a0a0). Extracted HTML rendering into_build_confirmation_html()helper for line-length compliance. Updated subject line to "Complete [Player]'s Tryout Registration". Added CTA button and fallback plain-text link.Test Plan
ruff checkandruff formatpass (confirmed locally)Review Checklist
ruff checkandruff formatpasssrc/basketball_api/brand.pyconstants/register?token=...withsettings.base_urlRelated
plan-2026-03-08-tryout-prepb9022808c759ede91e9b