From 0d08edb6355bfbe5586eae1f43257d533002d6fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 7 Feb 2023 01:29:47 +0100 Subject: Add various TODOs --- mu4web/html_render.py | 3 +++ mu4web/main.py | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/mu4web/html_render.py b/mu4web/html_render.py index 1d81321..fc608fb 100644 --- a/mu4web/html_render.py +++ b/mu4web/html_render.py @@ -8,6 +8,9 @@ try: except ImportError: from typing import Any as TypeAlias # type: ignore +# TODO compare this against xml.etree.ElementTree, which appears to +# have a HTML mode. + HTML: TypeAlias = Union[tuple, list['HTML'], Callable[[], str], diff --git a/mu4web/main.py b/mu4web/main.py index c945e7c..e6b1092 100644 --- a/mu4web/main.py +++ b/mu4web/main.py @@ -313,6 +313,9 @@ def search_page(q: str, by: Optional[str], direction: str) -> str: main_body = [search_field(q)] + # TODO pagination + # Mu handles the search without problem, but python is slow to + # build the table, and the browser has problem rendering it if q: main_body.append(search_result(q, by, direction)) @@ -419,6 +422,8 @@ def attachement_response(attachement: EmailMessage): response = flask.Response() response.charset = attachement.get_content_charset() response.mimetype = attachement.get_content_type() + # does get_content do stuff depending on content-type? + # Check how to explicitly get the raw bytes. response.set_data(attachement.get_content()) return response -- cgit v1.2.3