aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-02-07 01:29:47 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2023-02-07 01:29:47 +0100
commit0d08edb6355bfbe5586eae1f43257d533002d6fb (patch)
tree1a2ef464dff606a7552b9cac5fbc73ee8f8660a5
parentAdd support for CID linked images. (diff)
downloadmu4web-0d08edb6355bfbe5586eae1f43257d533002d6fb.tar.gz
mu4web-0d08edb6355bfbe5586eae1f43257d533002d6fb.tar.xz
Add various TODOs
-rw-r--r--mu4web/html_render.py3
-rw-r--r--mu4web/main.py5
2 files changed, 8 insertions, 0 deletions
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