The calendar¶
A worked example: a calendar as a Viewdata service. It is the framework’s own example, built from the standard library alone — no archive, no network and nothing to configure — so the framework is exercised by a service with nothing in common with a forum.
The numbering¶
Its pages, from the module’s own docstring:
1 the index
2 the date and time now
3 this month
32<date> the month containing a date
4 the days to come
42<date> one day
9 about
90 log off
92 93 94 history, contents, keywords (the framework's own)
Running it¶
uv run sextile serve calendar_viewdata:app # answer calls
uv run sextile render calendar_viewdata:app --page 3 # or just draw a page
This month¶
build_application(now=) takes the clock, so a fixed one draws the same month
every time:
from datetime import UTC, datetime
from calendar_viewdata import build_application
app = build_application(now=lambda: datetime(2026, 8, 1, tzinfo=UTC))
AUGUST 2026 3a MO TU WE TH FR SA SU 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 A previous month, D next month, 0 index
The calendar’s design note records that it needed no framework change at all, which is the point of a second application: everything it draws — the month grid, the days to come, the about page — is built from the parts the framework already had. What the framework lacked was found by the two services that are not made of the standard library, on the The forum and The weather pages.