From a29cbd968359b2995ae63cccfb3b7fcf14e28fe0 Mon Sep 17 00:00:00 2001 From: Stefan Bethke Date: Tue, 27 Feb 2024 19:42:19 +0100 Subject: [PATCH] Raum mit anzeigen --- foobaz.py | 4 +++- views/index.tpl | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/foobaz.py b/foobaz.py index b25720a..01a6323 100644 --- a/foobaz.py +++ b/foobaz.py @@ -9,11 +9,12 @@ from bottle import post, request, route, run, static_file, view from animation import Off from dmx import DMX, Bar252, StairvilleLedPar56, REDSpot18RGB +room = '' @route('/') @view('index') def index(): - return {'foo': 'bar'} + return {'room': room} @route('/static/') def static(path): @@ -76,6 +77,7 @@ def main(args): else: print(f"Unknown room {args.room}", file=sys.stderr) sys.exit(64) + room = args.room dmx.animation = Off() dmx.color = (0, 0, 0) dmx.animation = "off" diff --git a/views/index.tpl b/views/index.tpl index bb64fbb..33624b2 100644 --- a/views/index.tpl +++ b/views/index.tpl @@ -1,11 +1,11 @@ - Foo Baz DMX + Foo Baz DMX - {{room}} -

Foo Baz DMX

+

Foo Baz DMX - {{room}}

Animation