From 7070eb687d703bc03e759502f980fb340cef30d1 Mon Sep 17 00:00:00 2001 From: fingadumbledore Date: Mon, 24 Oct 2022 09:12:01 +0200 Subject: [PATCH] qr code --- main.py | 12 ++++++++++++ static/img/qr.png | Bin 0 -> 452 bytes templates/controll.html | 13 ------------- templates/planer.html | 16 ++++++++++++++-- templates/seesion.html | 2 ++ 5 files changed, 28 insertions(+), 15 deletions(-) create mode 100644 static/img/qr.png diff --git a/main.py b/main.py index 7e184a7..551b9b9 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,18 @@ from flask import Flask, render_template, jsonify, request, session, redirect import sqlite3 +import os import time +import qrcode +import shutil + +if not os.path.exists("./static/img/qr.png"): + img = qrcode.make('127.0.0.1:5000') + type(img) + img.save("qr.png") + ort = "./static/img" + shutil.move("qr.png", ort) + + app = Flask(__name__, template_folder='templates/') date = time.strftime("%d-%m-%Y %H:%M:%S", time.localtime(time.time())) diff --git a/static/img/qr.png b/static/img/qr.png new file mode 100644 index 0000000000000000000000000000000000000000..df1aa3175c2468311a9654ad8c98c1c05ccfb2de GIT binary patch literal 452 zcmV;#0XzPQP)J6-;S*CD7{l5_*qh77fEk|aG+%j-G>l}3-(7ZL!< z30Pg%ktjBBVzc0iM%^pEcU*SG!%|~g2?CG+)L$nN0H!}(TUEbrYS{Z&yzcJv{e$_p zs(#-TXPE*KZa*N)6rM=20l+4aK=R{tzZza_UHx9E(sLB6s|P~%LOKI=+j}ATthIC< zfhv2?`r@HTH|anGK-BFzx{g2%z6Y{rt)7Y>9RWD8{yJx_rRxaP==&Bxq!R%T#p(u3 zE<0OQzi;a9`&qkTISZ@lIs!HLei*q7gsayu=PXNGfSTl(=_HhP6FSR~m!QTRlb^~U zd6INFneU%T`Po=V=M12y5IXzTE=t7;r3Dr9w_DNm!c@?>&taM&vsqc!D^v3vlL&w! uT^3ShJ?EL!JjeXCEXOp;D5H$pJ@pL~*niPsrfGu!0000 -
-

Planer

-

Füge ein Event ein

- -

User Verwaltung

An dieser Stelle sollen später die User angezeigt werden, und der Session Admin kann diese dann verwalten

diff --git a/templates/planer.html b/templates/planer.html index 8a58d9b..32924ef 100644 --- a/templates/planer.html +++ b/templates/planer.html @@ -8,6 +8,18 @@ Planer -

Planer

- +

Planer

+

Füge ein Event ein

+ + +
+ \ No newline at end of file diff --git a/templates/seesion.html b/templates/seesion.html index f55e65c..6ef965e 100644 --- a/templates/seesion.html +++ b/templates/seesion.html @@ -11,6 +11,8 @@

Session Informationen

User:

Uptime:

+

QR-Code

+ \ No newline at end of file