From d7c8034672bcf3829f35c9f618adca7c0cf4fd50 Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Mon, 4 Mar 2024 08:59:48 +0100 Subject: [PATCH] code styling --- app/main.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/main.py b/app/main.py index 9b428d7..47fc7a8 100644 --- a/app/main.py +++ b/app/main.py @@ -123,13 +123,14 @@ async def _readme(request: Request): from markdown import markdown content = load_file('../README.md').decode('utf-8') markdown = markdown(text=content, extensions=['tables', 'fenced_code', 'md_in_html', 'nl2br', 'toc']) - context = {'request': request, 'markdown': markdown, 'VERSION': VERSION} + context = {'request': request, 'VERSION': VERSION, 'markdown': markdown } return templates.TemplateResponse(name='views/dashboard_readme.html', context=context) @app.get('/-/manage', summary='* Management UI') async def _manage(request: Request): - return templates.TemplateResponse(name='views/manage.html', context={'request': request, 'VERSION': VERSION}) + context = {'request': request, 'VERSION': VERSION} + return templates.TemplateResponse(name='views/manage.html', context=context) @app.get('/-/dashboard', summary='* Dashboard') @@ -140,12 +141,14 @@ async def _dashboard(request: Request): @app.get('/-/dashboard/origins', summary='* Dashboard - Origins') async def _dashboard_origins(request: Request): - return templates.TemplateResponse(name='views/dashboard_origins.html', context={'request': request, 'VERSION': VERSION}) + context = {'request': request, 'VERSION': VERSION} + return templates.TemplateResponse(name='views/dashboard_origins.html', context=context) @app.get('/-/dashboard/leases', summary='* Dashboard - Leases') async def _dashboard_origins(request: Request): - return templates.TemplateResponse(name='views/dashboard_leases.html', context={'request': request, 'VERSION': VERSION}) + context = {'request': request, 'VERSION': VERSION} + return templates.TemplateResponse(name='views/dashboard_leases.html', context=context) @app.get('/-/origins', summary='* Origins')