diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-08-12 14:33:15 +0200 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-08-12 14:33:15 +0200 |
commit | 2c98d04e4d4a344dc04a481b039a235678f7848e (patch) | |
tree | 292b858fa07613c3c455961f17adf33e64db92e8 /src/hydrilla/proxy/web_ui/repos.py | |
parent | 3d025bfb796d3028282bc806d557b8289a42062b (diff) | |
download | haketilo-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.py | 23 |
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) |