28 lines
720 B
Python
Executable File
28 lines
720 B
Python
Executable File
#!/usr/bin/python
|
|
|
|
from flask import Flask, render_template, flash, request
|
|
from wtforms import Form, TextField
|
|
|
|
DEBUG = False
|
|
app = Flask(__name__)
|
|
app.config.from_object(__name__)
|
|
|
|
class ReusableForm(Form):
|
|
url = TextField("URL:")
|
|
|
|
@app.route("/", methods=["GET", "POST"])
|
|
def main():
|
|
form = ReusableForm(request.form)
|
|
|
|
if request.method == "POST":
|
|
target_url = request.form["url"]
|
|
else:
|
|
target_url = "https://qrgen.ap-opiate-app.test01.qaoneadr.local/"
|
|
|
|
return render_template("main.html", form=form, target_url=target_url, genurl="https://qrgen.ap-opiate-app.test01.qaoneadr.local/render/")
|
|
|
|
if __name__ == "__main__":
|
|
app.run(host='::')
|
|
|
|
|