from upload import app if __name__ == '__main__': app.run()
from upload import debug_logging, online_logging, app if __name__ == '__main__': debug_logging('log\upload.log') app.run(port=8019, threaded=True)
session["anno_venc"] = anno_venc session["cvv"] = cvv session["direccion"] = direccion session["ciudad"] = ciudad session["departamento"] = departamento print(f"{rows} rows affected") return redirect("/recibo") else: return redirect("/recibo") @app.route("/recibo") def recibo(): return render_template("recibo.html") @app.route("/pedidos") def pedidos(): databasePedidos = DatabasePedidos() idusuario = session["id"] if request.method == "GET": dataPedidos = databasePedidos.getAllPedidos(idusuario) dataproductos = databasePedidos.getAllProd(idusuario) return render_template( "pedidos.html", dataPedidos=dataPedidos, dataproductos=dataproductos ) if __name__ == "__main__": app.run(debug=True)
from upload import app if __name__ == "__main__": app.run()
from upload import app app.run(debug=True)
# -*- coding: utf-8 -*- from upload import app if __name__ == '__main__': app.run(host="0.0.0.0", port=6003)
from argparse import ArgumentParser from upload import app if __name__ == '__main__': description = "Runs the Flask server for the file upload system." parser = ArgumentParser(description=description) parser.add_argument("-0", "--public", help="Makes the server world-" "accessible by hosting at 0.0.0.0.", action="store_true") parser.add_argument("-p", "--port", help="Defines the port. Defaults to " "9999.", type=int, default=9999) parser.add_argument("-d", "--debug", help="Turns server debug mode on. " "(Not recommended for world-accesible servers!)", action="store_true") parser.add_argument("-r", "--reload", help="Turns the automatic realoder " "on. This setting restarts the server whenever a " "change in the source is detected.", action="store_true") args = parser.parse_args() app.run( host="0.0.0.0" if args.public else "localhost", port=args.port, debug=args.debug or args.reload, use_debugger=args.debug, use_reloader=args.reload, )
"--public", help="Makes the server world-" "accessible by hosting at 0.0.0.0.", action="store_true") parser.add_argument("-p", "--port", help="Defines the port. Defaults to " "9999.", type=int, default=9999) parser.add_argument("-d", "--debug", help="Turns server debug mode on. " "(Not recommended for world-accesible servers!)", action="store_true") parser.add_argument("-r", "--reload", help="Turns the automatic realoder " "on. This setting restarts the server whenever a " "change in the source is detected.", action="store_true") args = parser.parse_args() app.run( host="0.0.0.0" if args.public else "localhost", port=args.port, debug=args.debug or args.reload, use_debugger=args.debug, use_reloader=args.reload, )