aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/web_ui/repos.py
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-08-12 14:33:15 +0200
committerWojtek Kosior <koszko@koszko.org>2022-08-12 14:33:15 +0200
commit2c98d04e4d4a344dc04a481b039a235678f7848e (patch)
tree292b858fa07613c3c455961f17adf33e64db92e8 /src/hydrilla/proxy/web_ui/repos.py
parent3d025bfb796d3028282bc806d557b8289a42062b (diff)
downloadhaketilo-hydrilla-2c98d04e4d4a344dc04a481b039a235678f7848e.tar.gz
haketilo-hydrilla-2c98d04e4d4a344dc04a481b039a235678f7848e.zip
make Haketilo proxy web UI in terms of a Flask app
Diffstat (limited to 'src/hydrilla/proxy/web_ui/repos.py')
-rw-r--r--src/hydrilla/proxy/web_ui/repos.py23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/hydrilla/proxy/web_ui/repos.py b/src/hydrilla/proxy/web_ui/repos.py
index d20791c..0f55b2a 100644
--- a/src/hydrilla/proxy/web_ui/repos.py
+++ b/src/hydrilla/proxy/web_ui/repos.py
@@ -33,17 +33,12 @@ from __future__ import annotations
import typing as t
-from ...translations import smart_gettext as _
-from .. import state as st
-from .. import http_messages
-
-def respond(
- request: http_messages.RequestInfo,
- rest_of_path: t.Sequence[str],
- state: st.HaketiloState
-) -> http_messages.ProducedResponse:
- return http_messages.ProducedResponse(
- 404,
- [(b'Content-Type', b'text/plain; charset=utf-8')],
- _('api.repos_not_implemented').encode()
- )
+import flask
+
+
+bp = flask.Blueprint('repos', __package__)
+
+@bp.route('/repos')
+def repos() -> flask.Response:
+ html = flask.render_template('repos.html.jinja')
+ return flask.make_response(html, 200)