mirror of
https://github.com/tebarius/Docker-Flask-QR.git
synced 2025-12-20 22:23:30 +01:00
Initial commit
This commit is contained in:
20
Flask-QR.py
Normal file
20
Flask-QR.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from flask import Flask, render_template, request
|
||||
from flask_qrcode import QRcode
|
||||
|
||||
app = Flask(__name__)
|
||||
QRcode(app)
|
||||
|
||||
|
||||
@app.route("/")
|
||||
def index():
|
||||
return render_template('index.html')
|
||||
|
||||
|
||||
@app.route("/qr.html")
|
||||
def makeqr():
|
||||
data = request.args.get('qr')
|
||||
return render_template('qr.html', data=data)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(host='0.0.0.0', port=80)
|
||||
Reference in New Issue
Block a user