#!/bin/sh
set -e
-python3 -m mypy task.py
-python3 -m flake8 task.py
-python3 -m pylint --good-names 'do_GET,do_POST' task.py
+python3 -m mypy *.py
+python3 -m flake8 *.py
+python3 -m pylint --good-names 'do_GET,do_POST' *.py
exit 0
from http.server import BaseHTTPRequestHandler
from http.server import HTTPServer
from jinja2 import Environment as JinjaEnv, FileSystemLoader as JinjaFSLoader
+from days import Day
HTTP_PORT = 8082
TEMPLATES_DIR = 'templates'
"""Handle any GET request."""
self.send_response(200)
self.end_headers()
- html = self.server.jinja.get_template('index.html').render()
+ days = [Day('2024-01-03'), Day('2024-01-01'), Day('2024-01-02')]
+ days.sort()
+ html = self.server.jinja.get_template('calendar.html').render(
+ days=days)
self.wfile.write(bytes(html, 'utf-8'))