38 lines
725 B
Python
38 lines
725 B
Python
from flask import (
|
|
Flask,
|
|
render_template
|
|
)
|
|
|
|
from models import db
|
|
from admin import admin
|
|
from endpoints.taquillas import taquillas
|
|
from endpoints.alquileres import alquileres
|
|
from endpoints.retrasos import retrasos
|
|
|
|
app = Flask(__name__)
|
|
|
|
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///project.db"
|
|
app.secret_key = "hola"
|
|
|
|
db.init_app(app)
|
|
|
|
app.register_blueprint(taquillas)
|
|
app.register_blueprint(alquileres)
|
|
app.register_blueprint(retrasos)
|
|
|
|
@app.route("/")
|
|
def index():
|
|
return render_template("pagina_principal.html")
|
|
|
|
|
|
with app.app_context():
|
|
db.create_all()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
admin.init_app(app)
|
|
app.run(
|
|
host="0.0.0.0",
|
|
port=5000,
|
|
debug=True
|
|
) |