A6: public home with the six states, confirmed prize, countdown and polling (WEB-05, WEB-10, WEB-11, WEB-14; LIM-24, WEB-55)

public_state() feeds both the server-rendered home (works without JavaScript)
and GET /stato/, so they cannot disagree: none, open, closing, drawing, paying
and maintenance, the round's own quota, the winner's 70% of the *confirmed*
pool, bets in flight apart, and the closing time on the server's clock. home.js
counts down against the server clock and polls every 5 s while visible. Checked
in headless Chromium on mobile and desktop widths. Also records the profile
reports (WEB-55, roadmap A9) and the name-lock trade-off (LIM-24).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
davideandClaude Sonnet 5.5 committed 2026-11-16 14:19:56 +01:00
1 parent efb3e2e702
commit 939c113043
16 files changed
+627 -11

No files matched your search

+12 -2
View File
@@ -4,10 +4,20 @@ from django.http import HttpResponse, JsonResponse
from django.shortcuts import render
from django.views.decorators.cache import never_cache
from apps.lottery.status import public_state
@never_cache
def home(request):
"""Placeholder landing page: the real home (WEB-10) arrives with A6."""
return render(request, "web/home.html")
"""The public home (WEB-10): the state is rendered by the server, so the page works without JavaScript;
`home.js` then keeps the countdown and polls `state` (WEB-05)."""
return render(request, "web/home.html", {"s": public_state()})
@never_cache
def state(request):
"""The same state as JSON, public and never cached: what the home page polls (WEB-05, WEB-10)."""
return JsonResponse(public_state())
@never_cache