Jul 28 - Update the demo request button, and add demo registration page

This commit is contained in:
2026-07-28 14:18:22 -04:00
parent 6b904aead9
commit ea9458395d
17 changed files with 905 additions and 13 deletions
+31 -1
View File
@@ -16,9 +16,39 @@ class Config:
SQLALCHEMY_TRACK_MODIFICATIONS = False
SQLALCHEMY_ENGINE_OPTIONS = {"pool_pre_ping": True, "pool_recycle": 280}
# Public contact button target shown in the closing CTA.
# Public contact button target shown in the closing CTA. Still used as the
# "or just email us" fallback link under the booking form.
DEMO_CONTACT_URL = os.environ.get("DEMO_CONTACT_URL", "mailto:info@ltservicesinc.com")
# --- Demo appointment requests ---
# Where the owner notification is sent. Blank -> no mail is sent, the
# request is still stored and visible in /admin/demos.
DEMO_NOTIFY_EMAIL = os.environ.get("DEMO_NOTIFY_EMAIL", "")
# Send the customer a "we got it" copy as well.
DEMO_CONFIRM_CUSTOMER = os.environ.get("DEMO_CONFIRM_CUSTOMER", "1") == "1"
# Bookable window, local business hours. Slots are generated every
# DEMO_SLOT_MINUTES from DEMO_HOUR_START up to (not including) DEMO_HOUR_END.
DEMO_HOUR_START = int(os.environ.get("DEMO_HOUR_START", "8"))
DEMO_HOUR_END = int(os.environ.get("DEMO_HOUR_END", "17"))
DEMO_SLOT_MINUTES = int(os.environ.get("DEMO_SLOT_MINUTES", "30"))
# How far ahead a customer may book, in days.
DEMO_MAX_DAYS_AHEAD = int(os.environ.get("DEMO_MAX_DAYS_AHEAD", "90"))
# Label only — dates/times are stored exactly as the customer picked them.
DEMO_TIMEZONE_LABEL = os.environ.get("DEMO_TIMEZONE_LABEL", "Local time")
# Max requests accepted from one IP per hour (per gunicorn worker).
DEMO_RATE_LIMIT = int(os.environ.get("DEMO_RATE_LIMIT", "5"))
# --- Outgoing mail (SMTP) ---
SMTP_HOST = os.environ.get("SMTP_HOST", "")
SMTP_PORT = int(os.environ.get("SMTP_PORT", "587"))
SMTP_USER = os.environ.get("SMTP_USER", "")
SMTP_PASSWORD = os.environ.get("SMTP_PASSWORD", "")
SMTP_USE_TLS = os.environ.get("SMTP_USE_TLS", "1") == "1" # STARTTLS on 587
SMTP_USE_SSL = os.environ.get("SMTP_USE_SSL", "0") == "1" # implicit TLS on 465
SMTP_TIMEOUT = int(os.environ.get("SMTP_TIMEOUT", "20"))
MAIL_FROM = os.environ.get("MAIL_FROM", "") or SMTP_USER
MAIL_SUBJECT_PREFIX = os.environ.get("MAIL_SUBJECT_PREFIX", "[JQC]")
# --- Admin / session ---
# SECRET_KEY signs session cookies and CSRF tokens. MUST be set in production.
SECRET_KEY = os.environ.get("SECRET_KEY", "dev-only-insecure-change-me")