Mercurial > code > home > repos > gcalendarwatch
diff gcalendarwatch.py @ 84:5f7ae444ecae
more custom namespaces in debug graph displays
author | drewp@bigasterisk.com |
---|---|
date | Sat, 07 Sep 2024 16:13:55 -0700 |
parents | e53a1bc87f99 |
children | f75b3a109b66 |
line wrap: on
line diff
--- a/gcalendarwatch.py Sat Sep 07 16:12:15 2024 -0700 +++ b/gcalendarwatch.py Sat Sep 07 16:13:55 2024 -0700 @@ -144,15 +144,20 @@ def getRoot(request: Request) -> HTMLResponse: return HTMLResponse(content=open("index.html").read().replace("MSG", statusMsg(conf, loop))) + moreNs = { + "": "http://bigasterisk.com/event#", + "cal": "http://bigasterisk.com/calendar/", + "event": "http://bigasterisk.com/calendarEvent/", + } app = Starlette(debug=True, routes=[ Route('/', getRoot), - Route('/graph/calendar/upcoming', StaticGraph(agendaGraph)), + Route('/graph/calendar/upcoming', StaticGraph(agendaGraph, moreNs)), Route('/graph/calendar/upcoming/events', GraphEvents(agendaGraph)), - Route('/graph/calendar/countdown', StaticGraph(countdownGraph)), + Route('/graph/calendar/countdown', StaticGraph(countdownGraph, moreNs)), Route('/graph/calendar/countdown/events', GraphEvents(countdownGraph)), - Route('/graph/currentEvents', StaticGraph(currentEventsGraph)), + Route('/graph/currentEvents', StaticGraph(currentEventsGraph, moreNs)), Route('/graph/currentEvents/events', GraphEvents(currentEventsGraph)), Route('/pollNow', functools.partial(PollNow, loop), methods=['POST']) ])