[BASIC]
init-hook='import sys; sys.path.append(".")'
-good-names-rgxs=(test_)?do_(GET|POST)(_[a-z]+)?,test_[A-Z]+
+good-names-rgxs=.*_?do_(GET|POST)(_[a-z]+)?,test_[A-Z]+
finally:
self.conn.close()
- def do_GET_calendar(self) -> dict[str, object]:
+ def _do_GET_calendar(self) -> dict[str, object]:
"""Show Days from ?start= to ?end=."""
start = self.params.get_str('start')
end = self.params.get_str('end')
today = date_in_n_days(0)
return {'start': start, 'end': end, 'days': days, 'today': today}
+ def do_GET_calendar(self) -> dict[str, object]:
+ """Show Days from ?start= to ?end= – normal view."""
+ return self._do_GET_calendar()
+
+ def do_GET_calendar_txt(self) -> dict[str, object]:
+ """Show Days from ?start= to ?end= – minimalist view."""
+ return self._do_GET_calendar()
+
def do_GET_day(self) -> dict[str, object]:
"""Show single Day of ?date=."""
date = self.params.get_str('date', date_in_n_days(0))
{% block content %}
<h3>calendar</h3>
+<p><a href="/calendar_txt">basic view</a></p>
+
<form action="calendar" method="GET">
from <input name="start" value="{{start}}" />
to <input name="end" value="{{end}}" />