Ejemplo n.º 1
0
from upload import app

if __name__ == '__main__':
    app.run()
Ejemplo n.º 2
0
from upload import debug_logging, online_logging, app

if __name__ == '__main__':
    debug_logging('log\upload.log')
    app.run(port=8019, threaded=True)
Ejemplo n.º 3
0
                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)
Ejemplo n.º 4
0
from upload import app

if __name__ == "__main__":
    app.run()
Ejemplo n.º 5
0
from upload import app
app.run(debug=True)
Ejemplo n.º 6
0
# -*- coding: utf-8 -*-

from upload import app

if __name__ == '__main__':
    app.run(host="0.0.0.0", port=6003)
Ejemplo n.º 7
0
Archivo: run.py Proyecto: spurll/upload
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,
    )
Ejemplo n.º 8
0
Archivo: run.py Proyecto: spurll/upload
                        "--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,
    )