From 7a2a9ab969e7620c272d988cb599a9379dc85185 Mon Sep 17 00:00:00 2001 From: norohind <60548839+norohind@users.noreply.github.com> Date: Thu, 2 Dec 2021 22:25:03 +0300 Subject: [PATCH] Normal index page --- static/index.html | 4 +++- utils.py | 18 +++++++----------- web.py | 3 --- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/static/index.html b/static/index.html index 2426a84..f8ba22a 100644 --- a/static/index.html +++ b/static/index.html @@ -47,6 +47,8 @@ TRADE - In order to access to api, add /api/ to any endpoint + In order to access to api, add /api/ prefix to any endpoint url
+ Author contact: a31#6403 (discord), a31@demb.design (email)
+
Source code \ No newline at end of file diff --git a/utils.py b/utils.py index 99dd7d8..628c97e 100644 --- a/utils.py +++ b/utils.py @@ -141,15 +141,6 @@ def _get_bearer() -> str: return bearer -def build_index_page(app: falcon.App, index_path: str) -> None: - with open(index_path, 'w', encoding='utf-8') as index_file: # kinda documentation on main page - from falcon import inspect - app_info = inspect.inspect_app(app) - app_info_str = app_info.__str__().replace('\n', '
') - - index_file.write(index_template.format(body=app_info_str)) - - def measure(function: callable): """ Decorator to measure function (method) execution time @@ -204,8 +195,13 @@ activity_table_html_template = """ -
-
+
+
+
+ +
""" diff --git a/web.py b/web.py index f629821..e9dc8a1 100644 --- a/web.py +++ b/web.py @@ -119,9 +119,6 @@ app.add_route('/', MainPage()) application = app # for uwsgi -# index_file = os.path.join(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'static'), 'index.html') - -# utils.build_index_page(app, index_file) if __name__ == '__main__': import waitress