diff --git a/app/app.py b/app/app.py index 904e9bc..d1c02f3 100644 --- a/app/app.py +++ b/app/app.py @@ -1,6 +1,6 @@ -import json, os, time, datetime, urllib.request, urllib.parse +import json, os, re, time, datetime, urllib.request, urllib.parse from pathlib import Path -from fastapi import FastAPI, Form +from fastapi import FastAPI, Form, Request from fastapi.responses import FileResponse, HTMLResponse, RedirectResponse from fastapi.staticfiles import StaticFiles @@ -634,7 +634,10 @@ def thanks_body(): """ -def join_body(): +def join_body(error=""): + err_html = ( + '
' + + error + "
") if error else "" faq_html = "".join(f'
{q}
{a}
' for q, a in FAQ) return f"""
@@ -649,7 +652,8 @@ def join_body(): Scouts cheering during a pack game
-
Interest form
+
Interest form
{err_html} +
@@ -747,10 +751,58 @@ def pipeline_notify(rec, sheet_error=None): except Exception: return False +# --- form integrity -------------------------------------------------------- +# 2026-08-30: three bot submissions landed with both