def do_GET_calendar(self, conn: DatabaseConnection, start: str, end: str):
"""Show Days."""
return self.server.jinja.get_template('calendar.html').render(
- days=Day.all(conn, date_range=(start, end)))
+ days=Day.all(conn, date_range=(start, end)),
+ start=start, end=end)
def do_GET_day(self, conn: DatabaseConnection, date: str):
"""Show single Day."""
{% extends 'base.html' %}
{% block content %}
+<form action="calendar" method="GET">
+from <input name="start" value="{{start}}" />
+to <input name="end" value="{{end}}" />
+<input type="submit" value="OK" />
+</form>
<ul>
{% for day in days %}
<li><a href="day?date={{day.date}}">{{day.date}}</a> ({{day.weekday}}) {{day.comment|e}}