|
@ -2,6 +2,8 @@ |
|
|
from flask import Flask, render_template |
|
|
from flask import Flask, render_template |
|
|
import qrcode |
|
|
import qrcode |
|
|
import os |
|
|
import os |
|
|
|
|
|
from urllib.parse import quote |
|
|
|
|
|
from PIL import Image |
|
|
app = Flask(__name__, template_folder="templates") |
|
|
app = Flask(__name__, template_folder="templates") |
|
|
|
|
|
|
|
|
@app.route('/') |
|
|
@app.route('/') |
|
@ -12,9 +14,9 @@ def index(): |
|
|
qr.make(fit=True) |
|
|
qr.make(fit=True) |
|
|
qr_img = qr.make_image(fill_color="black", back_color="white") |
|
|
qr_img = qr.make_image(fill_color="black", back_color="white") |
|
|
qr_img = qr.make_image(fill_color="black", back_color="white") |
|
|
qr_img = qr.make_image(fill_color="black", back_color="white") |
|
|
qr_img.save("/home/anpham/Projects/virtual-bussiness-card/static/qr_code.png") # Save QR code image |
|
|
|
|
|
|
|
|
qr_img.save("static/qr_code.png") # Save QR code image |
|
|
return render_template('index.html') |
|
|
return render_template('index.html') |
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
if __name__ == '__main__': |
|
|
app.run(debug=True) |
|
|
|
|
|
|
|
|
app.run(host='0.0.0.0', port=5000) |
|
|
|
|
|
|