From: Christian Heller Date: Wed, 20 Mar 2024 02:37:25 +0000 (+0100) Subject: Add date range input form to /calendar view. X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/%7B%7Bprefix%7D%7D/bar%20baz.html?a=commitdiff_plain;h=af769db012fc0cf590b565c3368102b2f6099394;p=plomtask Add date range input form to /calendar view. --- diff --git a/plomtask/http.py b/plomtask/http.py index b698fcb..58b575f 100644 --- a/plomtask/http.py +++ b/plomtask/http.py @@ -46,7 +46,8 @@ class TaskHandler(BaseHTTPRequestHandler): 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.""" diff --git a/templates/calendar.html b/templates/calendar.html index 0b7197f..3acdbc6 100644 --- a/templates/calendar.html +++ b/templates/calendar.html @@ -1,6 +1,11 @@ {% extends 'base.html' %} {% block content %} +
+from +to + +