def show_qr_code_from_data(): data = request.args['data'] log.debug('QR code requested for: {}'.format(data)) image = qr.generate_qr_image(data) response = make_response(image) response.headers['Content-Type'] = 'image/svg+xml' return response
def show_system_qrcode(): base_url = app.external_uri if app.external_uri else request.host_url data = '{}/v1/input/'.format(base_url) log.debug('Connect QR code requested for: {}'.format(data)) image = qr.generate_qr_image(data) response = make_response(image) response.headers['Content-Type'] = 'image/svg+xml' return response
def show_sl4a_qrcode(): with open(path.abspath(path.join('sl4a', 'QR-IO.py')), "r") as f: data = f.readlines() base_url = app.external_uri if app.external_uri else request.host_url log.debug('sl4a QR code requested') image = qr.generate_qr_image(data, error='L') response = make_response(image) response.headers['Content-Type'] = 'image/svg+xml' return response
def show_system_qrcode(): base_url = 'http://'+app.external_uri+'/' if app.external_uri \ else request.host_url data = '{}v1/input/'.format(base_url) log.debug('Connect QR code requested for: {}'.format(data)) image = qr.generate_qr_image(data) response = make_response(image) response.headers['Content-Type'] = 'image/svg+xml' return response